Hi there,
as I’m new to this forum I want to greet the members of this forum! In our company we are planning to re-implement an existing web-application and I want to check if Yii could be a good framework to base our application upon.
Currently I have a problem with the way Yii handles client-side validation. AFAIK yii uses some own js code (based on jquery) which intercepts the submit checks if the values were validated already, validates them if needed and calls the submit again.
So the sequence for the submit (in case the validation succeeds) is something like:
[list=1][]Some generic event like a "button click" issues the submit.[]The submit is intercepted. Because no validation was done before the values are now validated[*]The submit is called again (through a submit button yii hopes to find inside the form if read the code correct, but I do not really understand the chosen implementation) and the data is transferred to the server.[/list]I tried to draw this as a picture: 2340
While the validation works like a charm, I really do miss two features:
- Call the validation explicitly (without a submit)
- Call the submit without the validation
The first one would be great for ajax-submits, which do not use the form.submit().
The second one is needed to bypass the validation if needed e.g. for abort buttons.
Some really nice-to-have would be to even choose the scenario on the client side…
For the case, where you want an ajax-submission to be validated before sending, a "solution" is presented in bug #2008 but that is more a walkaround than a solution to me…
Both features seem to be missed by several users of yii as a quick forum search reveals:
So what is the state of these issues? Will they be addressed in the near future or is it more likely that Yii will never provide the requested features?
Any opinions, corrections and suggestions are highly welcome!
Greets acron