nsagora / peppermint Goto Github PK
View Code? Open in Web Editor NEWDeclarative data validation framework, written in Swift
License: MIT License
Declarative data validation framework, written in Swift
License: MIT License
Hi,
By applying a small addition to the already existing ValidationResult
extension it's possible to retrieve immediately the error without using any switch-case let
statements.
extension ValidationResult {
public var error: ValidationError? {
switch self {
case .valid: return nil
case let .invalid(error): return error
}
}
}
In this way the usage is much easier
guard result.error == nil else {
// do something with the error
return
}
Instead of
if result.isInvalid {
// to get the actual error you have to switch over the enum.
// that makes the isInvalid almost useless in this case.
}
Add example projects to document the framework integration and usage inside other projects.
Create an MR template that contains a checklist of activities to perform before submitting the MR. This checklist should include like tests passing, every target builds, pod lint is successful, etc.
Include usage examples of the framework for a sneak preview before installing the dependency.
The readme file doesn't reflect the current stage of the codebase.
Improve the declarative syntax style of the API.
Populate the readme.md file with installation sections for:
Rewrite every build script as a fastlane script and use the TravisCI matrix to run it.
Apple introduced DocC at WWDC21. It is a documentation compiler which allows framework and package authors to write and publish reach and interactive documentation for their clients of their software.
Inspired from SwiftUI,a modifier is a method on a constraint that returns a new constraint by decorating the caller with more functionality.
For example, one may call the .optional()
modifier to return an OptionalConstraint
.
The purpose is to simplify the API syntax.
is there any plan to support modern async with this library?
btw good work with the declarative api ! clearly underrated package imho
Update the ValidationToolkit.playground examples to run with the latest code base version.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.