APYDataGridBundle
APYDataGridBundle copied to clipboard
Validating data
Its possible to check values from inputs before getting new data ? It may not be strictly a true validation, maybe just values from inputs before render new data
It would be nice :-) What do you think?
Column classes have the isQueryValid() method to control the input value before filtering. If this function return false, the value is ignored.
Do you mean this type of validation ?
im not sure, i need for example check string long (value long for some row filter), its possible with this ?
string long
You mean string length or long integer ?
length of course, sorry
You can create a new column class with the isQueryValid() method override where you test your string length. And don't forget to declare your new column in config.
Maybe we can add the possibility to add filter validator for a column.
If we use the Symfony Form component for manage filters (#797), we could use the Symfony Validator component for validate the filters data.