hi,
is it possible to trigger a custom rule for 2 input fields?
for example i have 2 fields which are dependant on each other. 1 or the other is required. but both can't not be empty.
how would i do this?
cheers
3 Answers, 1 is accepted
0
Alexander Valchev
Telerik team
answered on 04 Jan 2013, 12:17 PM
Hello David,
Each custom rule will be run for each element in the validator form (docs). In other words you cannot run custom rule for two input fields at once - the rule will be triggered for each of them separately. If your requirement is to compare two fields, please select the other field with jQuery and check whether it is empty.
Kind regards,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
yes - thats possible - but doesn't remove the validation error.
there are tricks to get around that i guess if its not possible such as forcing a hide + or trigging blur() on the fields i wish to validate
0
Accepted
Alexander Valchev
Telerik team
answered on 08 Jan 2013, 09:31 AM
Hello David,
The validation messages can be hidden through jQuery hide method. For more information please check this forum topic.
To select a specific message, you may use it's data-for attribute. As an example: