clear()
clears a form
clear(method?: "value" | "validation"): void;
Parameters:
method: string
- optional, the method of clearing a form:- "value" - clears only form values
- "validation" - clears only form validation
- without parameters - clears both form values and validation
Example
// clears only form validation
form.clear("validation");
// clears only form values
form.clear("value");
// clears both form values and validation
form.clear();
Related sample: Form. Clear form
Change log:
added in v6.1