obss
logo
github_iconnpm_iconVersion: 5.0.2
focusToErrorAfterSubmitView on GitHub

focusToErrorAfterSubmit parameter is used to automatically focus to the first element with a validation error. In order to find the element on DOM, path value should be equal to the HTML element ID. If DOM element ID is different than path value, then the DOM element ID should be passed as elementId param to the rule definition.

Validation Result: validationresultvalid
[ { "path": "textVal1", "ruleSet": [ { "rule": "required" } ] }, { "path": "textVal2", "ruleSet": [ { "rule": "required" }, { "rule": "length", "greaterThanOrEqualTo": 7 } ] }, { "path": "val3", "ruleSet": [ { "rule": "required" }, { "rule": "listSize", "equalTo": 2 } ] }, { "path": "textVal4", "ruleSet": [ { "rule": "required" }, { "rule": "url" } ] } ]