Skip to content

Validation

Validation

Validation displays error messages below form inputs with customizable styling via class overrides.

PropertyValue
Font Size12px (text-f-12)
Font WeightLight (font-poppins-light)
Color (default)Red (text-primary-tselRed)
Margin Top4px (mt-1)
IconNone
OptionTypeDefaultDescription
validation.messagestringrequiredError message text to display
validation.classesstring'text-primary-tselRed'Custom CSS classes overriding default color/style

Default red error message — validation.classes omitted or ‘text-primary-tselRed’

Error Variant

Orange caution message — validation.classes set to ‘text-secondary-tselMustard’

Error Variant

Green success message — validation.classes set to ‘text-secondary-tselGreen’

Error Variant

Blue informational hint — validation.classes set to ‘text-secondary-tselBlue’

Error Variant
TypeExample
Required”This field is required”
Invalid”Please enter a valid email”
Too short”Must be at least 8 characters”
Mismatch”Passwords do not match”
  • Form validation errors
  • Input field error messages
  • Custom error styling needed
  • Inline error feedback
✅ Do❌ Don’t
Provide clear, actionable messagesUse vague error messages
Position close to related input (4px)Show errors before user interacts
Use consistent message phrasingCluster multiple errors
Override classes for non-error use casesUse for critical alerts

View in Storybook →