Validation
Validation Localization
Translate validation messages with runtime locale selection and custom language support.
FormForge translates messages while keeping technical keys stable in English.
- only messages are translated
- error keys remain unchanged
Configuration:
validation.localevalidation.fallback_localevalidation.supported_localesvalidation.allow_request_localevalidation.locale_query_param(default:formforge_locale)validation.locale_header(default:X-FormForge-Locale)
Runtime locale priority:
- explicit locale argument in method call
- request query/header (if enabled)
- FormForge config locale
- app locale
- FormForge fallback locale
Add your own language
php artisan vendor:publish --tag=formforge-lang- copy
lang/vendor/formforge/ento your locale folder - translate message strings only
- keep technical keys unchanged
- add the locale to
validation.supported_locales
If a locale/key is missing, FormForge falls back to validation.fallback_locale.