validation icon indicating copy to clipboard operation
validation copied to clipboard

Design validator for one field, i.e. if we want to validate only one field without faking it as an array/object.

Open Albert221 opened this issue 8 years ago • 1 comments

Gettery, settery itd. można rozwiązać property accessorem z Symfony i nie patrzeć się w ogóle, czy to obiekt/tablica itd. Mi chodziło o coś prostszego w sumie - co gdy masz zasadę (Rule) dotyczącą nie jednego pola - a np. dwu lub więcej. Aktualny interface wymaga dodania najpierw nazwy pola - nie można dodać zasady walidacji na główny obiekt ($data). Tylko tyle i aż tyle :)

Albert221 avatar Dec 16 '17 00:12 Albert221

Idea

Add addRule method for validator so that the rules would be attached to the root field and will basically validate the whole object given to ->validate().

Albert221 avatar Dec 16 '17 00:12 Albert221