-
-
Notifications
You must be signed in to change notification settings - Fork 236
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
Forms: validation serverSide & clientSide #1294
Comments
The names are "corrected" for js in netteForms.js http://github.com/nette/nette/blob/89d48b7afba3b1b5bb90a8eae9a2dec6771ac93c/client-side/netteForms.js#L220 |
How can I missed that? :D This make it a little bit easier, but I would like to use some non-static callback, couldn't be here implemented something like if (is_array($op)) {
$op = get_class($op[0]) . '::' . $op[1]);
} Otherwise I would close this. |
I have some plans to improve validation and this will be solved. |
Unfortunately, that still doesn't solve problem with closures (which are most handful) at all. |
@Majk578 ... yes. |
I'm thinking about automated identifying closures and only possible cross-request solution seems to be declaring filename + line, but that won't work in oneliners. :S Any other idea? |
In current implementation it's (almost) impossible to add validation, which would generate some validation name for client-side. Let's take a walk.
fnValidator
foo\fnValidator
-> string -> the name is not "corrected" for jsfoo\bar::methodValidator
-> string -> the name is not "corrected" for jsarray('MyClass, 'methodValidator')
"op":"foo\\mytest"
.is_callable
function here - to be correct, it doesn't pass in array format. In string format such asfoo::mytest
this function behaves ok... but there is again problem with unusable javascript name ("op":"foo\bar::mytest"
)I would like to see some option to name the validation for Javascript.
The text was updated successfully, but these errors were encountered: