Appearance
Main Features β
Suriform provides a flexible toolkit for form handling β rules, messages, localization, and feedback β all under your control. Use as much or as little as you need, and everything works together seamlessly. Explore the main features that set Suriform apart.
π§ Custom Rules β
- Chain multiple or nested conditions within a single rule
- Return dynamic messages based on those conditions
- Write async rules seamlessly β even with multiple conditions
- Reference single or multiple fields for cross-field validation
- Handle dynamic required states using other field values
- Add custom formatters to fine-tune your validation messages
β‘ Built-in Rules β
- Use over 50 built-in rules, including native browser rules
- Extend built-in rules with your own validation and message
- Import built-in rules individually, by group or all at once
π¬ Messaging β
- Control messages at multiple levels: Rule, Locale, & Group
- Format
{tokens}consistently using: Positional & Keyβvalue - Wrap inline errors using the
wrapMessagetool for templating. - Group rules with the
groupMessagetool for unified messaging.
π Localization β
- Define a global locale object with field names and messages
- Localize any message by replacing it with a
message key - Localize any field by using the name as the
name key - Switch locales with ease β globally or per form
- Detect the initial locale automatically during setup
- Fallback intelligently when locale or keys are missing
β οΈ Error Handling β
- Display popup feedback using the
withPopuptool - Show summary feedback using the
withSummarytool - Track error states on: add, remove, change, collect, & empty
π§© Events & Hooks β
- Handle form submissions and async requests with the
useAjaxhook - Control validation lifecycle and timing using the
useValidityhook - Manage error events efficiently through the
useErrorshook
ποΈ Watchers β
- Observe forms and fields using the main
watchFormAPI - Auto-validate related fields using the
watchTargettool - Auto-observe fields that have been added dynamically
