Fields
Common properties

Common field properties

These are the common properties of a field ( inside meta field)

FieldData typeDefault ValueDescription
classNameStringNonePass classname for custom styling or reference
displayNameStringNoneIt is used to display name of the field in the form
displayTypeStringNoneIt is used to determine the field type to be displayed. Supported options:
displayPropsObjectNoneIt is used for field layouting. Refer for details: DisplayType
htmlPropsObjectNoneIt is used for setting native html attributes to basic form controls like text_field, select, number, password, email etc.
Example of such attributes would be like step, min, max for displayType number
valueString
Boolean
Number
NoneIt is value of the field
typeStringNoneUsed for hidden fields and field section.
Value for hidden field: hidden.
Value for section: section
validationObjectFor field validation
dependenciesObjectDefines relationships and dependencies between various fields. Refer here for details: Dependencies
eventsObjectDefines field level events

Common validation properties

FieldDescription
requiredMarks a field as mandatory
patternAdds a pattern validation for the field. For email, pattern is supported by default
patternDetailContains info msg and error msg for pattern validation property
minFor Textbox fields, it is the minimum number of characters required for the field,
For number fields, it is the minimum value allowed
maxFor Textbox fields it is the maximum number of characters allowed.
For number fields, it is the maximum value allowed
minDetailContains error and info msg for min validation property
maxDetailContains error and info msg for max validation property
infoDetailContains general info msg about the field
requiredDetailContains info msgs about the required validation property

Star us at github

© Copyright 2023 MuiForms.