Validation rules priority

Notice: This thread is very old.
vnovotny
Member | 12
+
0
-

Hi guys,

I need some help with form validation. I have some bigger form like this:

FORM
--EmployeeName
--Year/month
--Test1
----Question1 -> Result1
----Question2 -> Result2
--Test2
----Question1 -> Result1
----Question2 -> Result2
----Question3 -> Result3
----Question4 -> Result4
--Test3
----Question1 -> Result1
----Question2 -> Result2

I use some nette validation to check if both question and result are filled. If both empty, it is OK and I delete them after submit.

Then I use my custom validation script (client and server side) to check Suma of results in each test (it must be 100 in every test)

How can i force nette to do simple validation first and my custom validation later?

HosipLan
Moderator | 4668
+
0
-

There is an event, that might help you. Container::$onValidate https://api.nette.org/…ner.php.html#140