Skip to content

demetrio812/EurekaSwiftValidatorComponents

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Eureka Swift Validator Components

Eureka custom inline rows supporting SwiftValidator

Version 0.1

Example

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")
        }
    }

Screenshot

Example

TODO

  • pod specs
  • Support for more types

About

Eureka custom inline rows supporting SwiftValidator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages