Complex form validation - best method?

Hi,

Let’s say I have a form with two fields. Each field value format is to be validated independently, as usual, BUT, a third validation needs to occur, which is for the string concatenation of those two fields values.

I’m not seeing how I can integrate this with webix form rules, in a way that provides the standard UI validation feedback (red highlighting) matching all 3 cases (highlight one or the other field, or both). I guess I could use messages in the validation routines for additional feedback, but I’d like to know if this is doable only with the built-in highlighting.

Hints?

Thanks.

You can embed common check in validation rule of each field.
http://webix.com/snippet/4d01ad88
It will result in a small code duplications, though.

Normally, you can use $obj key in rules collection for complex validation rules. But such rules will not cause visual marking of invalid fields

Hi Maksim,

Thanks, but some files inside the zip fail CRC check. I’ve downloaded twice and tried both 7zip and WinRar.

Sorry, please try the updated one