Form Validation β
Form validation ensures user input data validity. FormCreate designer provides rich validation rule types for configuring various validation scenarios.
Note
Validation Trigger Timing: Supports three trigger methods:
blur(blur),change(value change),submit(submit)In custom validation, access component and form information through
this.ruleandthis.apito get values from other components during validation.When pattern type is string, don't include
/symbols before and after, otherwise the regular expression will be invalid.In custom validation, the callback function must be executed whether validation succeeds or fails.
Validation Rule Types β
FormCreate designer supports the following validation rule types:
Basic Validation Rules β
| Key | Rule Name | Description |
|---|---|---|
len | Length | Validate string length equals specified value |
minLen | Minimum Length | Validate string minimum length |
maxLen | Maximum Length | Validate string maximum length |
min | Minimum Value | Validate numeric minimum value |
max | Maximum Value | Validate numeric maximum value |
Format Validation Rules β
| Key | Rule Name | Description |
|---|---|---|
pattern | Regular Expression | Custom regular expression validation |
email | Email Format | Validate email format |
url | URL Format | Validate URL format |
ip | IP Address | Validate IP address format |
phone | Phone Number | Validate phone number format |
Character Validation Rules β
| Key | Rule Name | Description |
|---|---|---|
uppercase | All Uppercase | Validate must be uppercase letters |
lowercase | All Lowercase | Validate must be lowercase letters |
positive | Positive Number | Validate must be positive number |
negative | Negative Number | Validate must be negative number |
integer | Integer | Validate must be integer |
number | Number | Validate must be number |
Advanced Validation Rules β
| Key | Rule Name | Description |
|---|---|---|
validator | Custom Validation | Custom validation function |
These validation configurations let you build a fully functional and user-friendly form validation system.


