Custom validations
tawrahim opened this issue · 1 comments
tawrahim commented
Is there a way to include custom validations in SwiftyForms?
An example would be checking if the values in New Password
and Repeat Password
Field matches.
It would be nice to be able to provide a function to the validate method
neoneye commented
Specification Pattern is used for validation. It allows multiple specifications to be combined.
In order to create a custom validator you have to subclass CompositeSpecification
and install this custom specification in the TextFieldFormItem
.