Validators
Complete reference for all built-in validators
Ivandt provides 18 built-in validators for comprehensive data validation.
Quick Reference
| Validator | Purpose | Example |
|---|---|---|
required | Non-empty value | Name field |
email | Valid email | user@example.com |
phone | Valid phone number | +1 555-0100 |
url | Valid URL | https://example.com |
numeric | Valid number | 42 or 3.14 |
min | Minimum value | Age >= 18 |
max | Maximum value | Score <= 100 |
range | Value in range | 0-100 |
minLength | Min characters | Password >= 8 chars |
maxLength | Max characters | Title <= 255 chars |
regex | Pattern match | Product code ABC-1234 |
unique | No duplicates | Email addresses |
enumerate | From allowed list | Status: Active/Inactive |
boolean | True/false value | "true" or "false" |
date | Valid date | 2025-01-15 |
uuid | Valid UUID | 550e8400-e29b-41d4-a716 |
creditcard | Valid card number | 4111111111111111 |
rules | Complex logic | Cross-field validation |
Error Severity
All validators support two severity levels:
'e'(error): Blocks submission or removes rows (depending on configuration)'w'(warning): Allows submission but alerts the user
{
type: 'phone',
countries: ['US'],
severity: 'w', // Warning instead of error
message: 'Phone number format looks unusual'
}