Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not accept invalid filter values #73

Open
milo opened this issue Mar 15, 2017 · 5 comments
Open

Do not accept invalid filter values #73

milo opened this issue Mar 15, 2017 · 5 comments

Comments

@milo
Copy link
Contributor

milo commented Mar 15, 2017

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
Copy link
Member

hrach commented Mar 15, 2017

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

@milo
Copy link
Contributor Author

milo commented Mar 16, 2017

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

@hrach
Copy link
Member

hrach commented Mar 16, 2017

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
Copy link
Contributor Author

milo commented Mar 17, 2017

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

milo added a commit to milo/nextras-datagrid that referenced this issue Mar 31, 2017
milo pushed a commit to milo/nextras-datagrid that referenced this issue May 25, 2018
milo pushed a commit to milo/nextras-datagrid that referenced this issue Aug 14, 2018
@milo
Copy link
Contributor Author

milo commented Oct 5, 2021

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.

milo pushed a commit to milo/nextras-datagrid that referenced this issue Oct 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants