This document describes the validation rules that must be followed when creating or editing form configurations in the VGLUG Admin Panel.
- title (string, required): The title of the form
- sections (array, required): Array of section objects
Every form configuration must include exactly these 4 sections:
- basic_info - Personal Details
- educational_info - Educational Details
- family_info - Family Information
- income_info - Income Information
Each section must have:
- key (string, required): Unique identifier for the section
- label (string, required): Display name for the section
- fields (array, required): Array of field objects
Each field must have:
- actual_name (string, required): Unique identifier for the field
- label (string, required): Display label for the field
- type (string, required): Field type (text, date, boolean, select, number, textarea)
- mandatory (boolean, required): Whether the field is required
Optional field properties:
- options (array): For select type fields
- condition (string): Conditional visibility expression
All fields from the seed form must be present:
- first_name
- last_name
- dob
- contact
- contact_as_whatsapp
- watsapp_contact
- parent_contact
- differently_abled
All fields from the seed form must be present:
- 5_to_8_school
- 5_to_8_govt_school
- 9_to_10_school
- 9_to_10_govt_school
- 11_to_12_school
- 11_to_12_govt_school
- degree
- department
- year
- passed_out_year
Mandatory fields:
- raised_by_parents (boolean): Whether the student is raised by parents
- family_members_count (number/text): Number of family members
Mandatory fields:
- own_house_or_rental (text/select): Housing ownership status
- house_type (text/select): Type of house
- family_income (text/number): Family's income
- text: Single-line text input
- textarea: Multi-line text input
- date: Date picker
- boolean: True/false checkbox
- select: Dropdown with predefined options (requires "options" array)
- number: Numeric input
{
"title": "VGLUG APPLICATION FORM 2025",
"sections": [
{
"key": "basic_info",
"label": "Personal Details",
"fields": [
{
"label": "First Name",
"actual_name": "first_name",
"type": "text",
"mandatory": true
},
{
"label": "Email",
"actual_name": "email",
"type": "text",
"mandatory": true
}
// ... other required fields
]
},
{
"key": "educational_info",
"label": "Educational Details",
"fields": [
// ... required educational fields
]
},
{
"key": "family_info",
"label": "Family Information",
"fields": [
{
"label": "Raised by Parents?",
"actual_name": "raised_by_parents",
"type": "boolean",
"mandatory": true
},
{
"label": "Family Members Count",
"actual_name": "family_members_count",
"type": "number",
"mandatory": true
}
]
},
{
"key": "income_info",
"label": "Income Information",
"fields": [
{
"label": "Own House or Rental?",
"actual_name": "own_house_or_rental",
"type": "select",
"mandatory": true,
"options": ["Own House", "Rental"]
},
{
"label": "House Type",
"actual_name": "house_type",
"type": "text",
"mandatory": true
},
{
"label": "Family Income",
"actual_name": "family_income",
"type": "number",
"mandatory": true
}
]
}
]
}When you click "Save as New Version", the system will:
- Parse your JSON to ensure it's valid
- Check all required sections are present
- Verify all required fields exist in each section
- Validate field structure (actual_name, label, type, mandatory)
- Check field types are valid
- Verify select fields have options array
If validation fails, a modal will display specific errors that need to be fixed.
- Start with existing configuration: Copy an existing valid configuration and modify it
- Check JSON syntax: Ensure proper brackets, commas, and quotes
- Use Validation Rules button: Click "View Validation Rules" to see the schema
- Test incrementally: Make small changes and save frequently
- Keep required fields: Don't remove mandatory fields from basic_info and educational_info
Missing required section: "family_info"
Fix: Add the missing section to the sections array
Section "basic_info" is missing required field: "first_name"
Fix: Add the required field to the section's fields array
Field "age" has invalid type: "integer"
Fix: Use "number" instead of "integer"
Field "status" with type "select" must have an "options" array
Fix: Add an options array: "options": ["Option 1", "Option 2"]
Field "email" must have a "mandatory" property
Fix: Add "mandatory": true or "mandatory": false
If you encounter validation errors you don't understand:
- Check this documentation
- Click "View Validation Rules" in the admin panel
- Review the specific error messages in the validation modal
- Compare your JSON with the example configuration above