--- title: Validator desc: Validator class changes the color of form elements to error or success based on input's validation rules. layout: components classnames: component: - class: validator desc: For input, select, textarea part: - class: validator-hint desc: for the hint text that appears after the input if it's invalid --- ### ~Validator #### writing an invalid email address applies error color to the input. Valid email address applies success color.
```html ``` ### ~Validator and validator-hint #### If value is invalid, a hint text appears below the input. ```html
Must be more than 8 characters, including
At least one number
At least one lowercase letter
At least one uppercase letter
Must be 3 to 30 characters
containing only letters, numbers or dash
Must be 10 digits
``` ### ~URL input requirement validator ```htmlMust be valid URL
``` ### ~Date input requirement validator ```htmlMust be 2025
``` ### ~Number input requirement validator ```htmlMust be between be 1 to 10
``` ### ~Checkbox requirement validator ```htmlRequired
``` ### ~Toggle requirement validator ```htmlRequired
``` ### ~Select requirement validator #### Click the button before picking an option to see the error color. ```html ```