S
S
Sergey Pugovkin2016-12-01 04:03:23
JavaScript
Sergey Pugovkin, 2016-12-01 04:03:23

How to manually validate and display an error in the form through js?

How to manually validate and display an error in the form through js?
Here is an example: It does not display any errors. Perhaps it is intended for other purposes, but I need the same thing that happens when sending and, if possible, for one field. How?
$('#w0').yiiActiveForm('validate');

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Fedorov, 2016-12-01
@Driver86

$('#w0').yiiActiveForm('validateAttribute', 'attribute-name');

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question