Form validation add custom validation rule not set on a field ? |
[eluser]Rushino[/eluser]
Hello, I was wondering if its possible to add custom validation rule not set on a field but on the whole form ? Like checking if the username and password is okay, checking if the account is not blocked ? How would you set the rules ? Thanks.
[eluser]toopay[/eluser]
callback function : Callbacks: Your own Validation Functions
[eluser]4ever[/eluser]
[quote author="toopay" date="1305804872"]callback function : Callbacks: Your own Validation Functions[/quote] I've seen the link. I am just wondering why they put the validation rules to controller instead model. My controller's method: Code: function create_member(){ Clear... And the model: Code: function newMemberValidate($variant){ I've just have idea to make a method using the "Setting Rules Using an Array" from config, but I would like to configure like this: Code: $config = array( and then to make method which will transform that to the format as in the "Setting Rules Using an Array" section. |
Welcome Guest, Not a member yet? Register Sign In |