nextras / datagrid

Nextras Datagrid component for Nette Framework.
http://nextras.org/datagrid
MIT License
70 stars 39 forks source link

Do not accept invalid filter values #73

Open milo opened 7 years ago

milo commented 7 years ago

The filter values are passed to datasource callback even the form is invalid. It can be problem when sanitized value is expected, let's say MAC or IP address. Not sure how to change the behaviour, maybe do not redirect and do not pass filter values.

hrach commented 7 years ago

Well, I'd like the form be linkable, so only a get method would be solution, am I right?

milo commented 7 years ago

Or get only $control->isValid() values here?

hrach commented 7 years ago

Oh, I see, yeah, there should be "validation", but it will be still possible to pass invalid value from url - are you ok with it?

milo commented 7 years ago

It's OK. IMHO important is, that datasource callback does not obtain invalid filter.

milo commented 3 years ago

With newer nette/forms (I use v3.1.3) warning is emmited:

User Warning
Nette\Forms\Container::getValues() invoked but the form is not valid.