oscarotero / form-manager

PHP library to create and validate html forms
MIT License
153 stars 42 forks source link

Enhance/add validator by name #63 #64

Closed hdimo closed 7 years ago

hdimo commented 7 years ago

use name when adding validators and remove ithem;

oscarotero commented 7 years ago

Mmm, in your example in #63 the validation name is optional and placed as the second argument, but here it's required. I think is better make it optional, for backward compatibility and because in old versions there was a similar signature (name, callable) that was removed to avoid override accidentally previous validators.