gsouf / UForm

php form library
Other
0 stars 2 forks source link

Form mass validation and filtering #8

Open gsouf opened 9 years ago

gsouf commented 9 years ago

We shouold be able to add a global filter to the form or for a list of element

for instance we could want all text inputs to be sanitized with the filter Trim

gsouf commented 9 years ago
$group->globalValidator($validator, "*"); // add a validator to all children
$group->globalFilter($filter, "primary"); // add a validator to all primary elements (inputs, textarea, select...)
$group->globalFilter($filter, "input:text, input:password"); // add a validator to all password and text inputs