Eureka custom inline rows supporting SwiftValidator
Version 0.1
Define the rows and add the rules there (plus turn off autoValidation if you like):
form =
Section("Insert your data")
<<< SVTextRow() {
$0.title = "Name"
$0.placeholder = "Insert your full name"
$0.rules = [RequiredRule(), FullNameRule(), MinLengthRule(length: 5), MaxLengthRule(length: 10)]
$0.autoValidation = false
}
If autoValidation is off, validate all the rows:
@IBAction func saveClicked(sender: AnyObject) {
let dataValid = form.validateAll()
if dataValid {
NSLog("Valid")
} else {
NSLog("Invalid")
}
}
- pod specs
- Support for more types