Form Validator
Use this attribute-based validation system on Webflow to handle multiple forms with email blocking, country-aware phone validation, and real-time feedback. It dynamically checks business email domains and country codes, stays up to date automatically, and works smoothly with light and dark themes.
1. Add this <script> inside the <head> tag of your page or project
<script src="https://cdn.jsdelivr.net/gh/Everything-Design/everythingflow@main/Tools/Validation-form.js"></script>2. Add this attribute to the form block
ef-form-div="your-form-name"** It should be unique per form
3. Add this theme attribute to the form block to set the theme.
ef-form-theme="light"ef-form-theme="dark"Use ef-form-theme="light/dark" to choose the theme.
**Apply this attribute to the element having attribute ef-form-div="your-form-name"
4. Add these attributes to the form inputs
ef-form-input="plain"ef-form-input="business email"ef-form-input="email"ef-form-input="phone"**Apply this attribute to the Input elements in the forms
**Apply this attribute to the Input elements having business email input in the forms
**Apply this attribute to the Input elements having email input in the forms
**Apply this attribute to the Input elements having phone input in the forms
5. Add these attributes to the input should be required
ef-data-required="required"**Apply this attribute to the element having attribute ef-form-input="attribute value"
6. Add these attributes for the validation svg's or image
ef-form-val="right"ef-form-val="wrong"**Apply this attribute to the element which can be image or svg embed
7. Add these attributes for form buttons
ef-form-submit="Any name"**Apply this attribute to the form button
8. Add these attributes to select field (Optional)
ef-form-select="Country Code"**Apply this attribute to the select element
9. Add these attribute for inputs to change their color on border or background (Optional)
ef-bg="validation"ef-bd="validation"**Apply this attribute to the the element having attribute ef-data-required ="required"
10. Add country auto-select (Optional)
ef-geo="location"ef-geo="country-name"**Apply this attribute to the the element having attribute ef-form-select ="Country Code"
**Country name eg="India", "United States", **This is to avoid changing country code based on geo location