You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which makes creating a form much easier when I have multiple strings per field:
self.controlForm.addField(passwordTextField, validator:PresentValidator(violationString:"Please enter your password"))
The text was updated successfully, but these errors were encountered:
markst
changed the title
Allow for easier updating of localizedViolationString
Allow for initialising validator with localizedViolationString
May 5, 2017
This is a good suggestion. Although it'd be preferred if this was an optional parameter with a default of nil so that way if none is passed in through the initializer, the default localized violation string is used. This way you don't need to have more than one init and continues to maintain API stability in the framework.
If you'd like to raise a PR for this enhancement, we'd love to review it!
It would be nice if it were easier to update the
localizedViolationString
when initialising a violation object.For example I currently have an extension on
Validator
which allows me to initialise with a violationString.Which makes creating a form much easier when I have multiple strings per field:
The text was updated successfully, but these errors were encountered: