markInvalid

marks a form control invalid

void markInvalid(string name, [boolean| string state] );
namestringvalue of "name" parameter of the desired input
stateboolean| stringremoves invalid mark; sets invalidMessage

Example

$$("myform").markInvalid("login", "Login must not be empty");

Details

"State" parameter is optional. It may define:

  • (boolean) - whether to apply invalid marking or remove it (if false). True by default;
  • (string) - text of invalidMessage parameter of the input. If such parameter already exists, this method will redefine it.
See also
Back to top
If you have not checked yet, be sure to visit site of our main product Webix ui library and page of form widget product.