Field Validation
AC Custom Fields provides robust validation capabilities to ensure that the data entered by customers meets your specific requirements.

Validation Overview
Field validation helps ensure data quality by:
Preventing submission of invalid or incomplete data
Guiding customers to provide information in the correct format
Reducing errors in order processing and fulfillment
Improving the overall customer experience
Common Validation Options
Required Fields
Make any field mandatory for form submission:
Required Toggle: Enable/disable the required status of a field
Required Error Message: Customize the error message shown when a required field is left empty
Visual Indicators: Required fields are marked with an asterisk (*) by default
Character Limits
Control the length of text input:
Minimum Length: Set the minimum number of characters required
Maximum Length: Set the maximum number of characters allowed
Length Error Messages: Customize error messages for minimum and maximum length violations
Format Validation
Ensure data follows specific patterns:
Email Format: Validate that text follows a valid email format
URL Format: Validate that text follows a valid URL format
Phone Format: Validate that text follows a valid phone number format
Custom Regex: Define custom regular expressions for specialized validation
Field-Specific Validation
Text Field Validation
Alphanumeric Only: Restrict input to letters and numbers
Letters Only: Restrict input to letters
Numbers Only: Restrict input to numbers
Special Characters: Allow or disallow special characters
Textarea Field Validation
Word Count: Set minimum and maximum word counts
Line Count: Set minimum and maximum number of lines
HTML Filtering: Allow or disallow HTML tags
Number Field Validation
Minimum Value: Set the lowest acceptable number
Maximum Value: Set the highest acceptable number
Decimal Places: Control the number of decimal places allowed
Step Value: Define increment steps (e.g., only allow multiples of 0.5)
Date Field Validation
Date Range: Set minimum and maximum dates
Disallowed Dates: Specify dates that cannot be selected
Weekend/Weekday Restriction: Restrict selection to weekdays or weekends only
Future/Past Dates: Restrict selection to future or past dates only
Dropdown Field Validation
Default Selection: Set whether a default option must be selected
Option Limit: For multi-select dropdowns, set minimum and maximum selections
Checkbox Field Validation
Checked Requirement: Require the checkbox to be checked (useful for terms acceptance)
Group Validation: For checkbox groups, set minimum and maximum selections
Conditional Validation
Apply validation rules based on specific conditions:
Field Dependencies: Enable validation based on the values of other fields
Complex Conditions: Create advanced validation rules using AND/OR logic
Validation Groups: Apply different validation rules to different groups of fields
Validation Feedback
Control how validation errors are presented to customers:
Instant Validation: Validate as the customer types
On Blur Validation: Validate when the customer leaves a field
On Submit Validation: Validate only when the form is submitted
Error Placement: Control where error messages appear (below field, tooltip, etc.)
Error Styling: Customize the appearance of error messages and highlighted fields
Custom Validation
For advanced validation needs:
Custom Validation Functions: Create JavaScript functions for complex validation logic
API Validation: Validate against external APIs (e.g., address verification)
Asynchronous Validation: Perform validation that requires server-side processing
Last updated