You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While that approach works, it has the following limitations:
Some configurations that (e.g. transform property for Create) are ignored
Building server-side component is more complex that for Create (due to the fact we need to be inside record context), and it is not documented
Describe the solution you'd like
Allow for a configurable parameter that can be passed to Create and Update components that will translate an error and return it to the form as validation results:
constServerSideValidation=async(e:Error): Promise<undefined|Record<string,{message: string,messageArgs?: any}>>={returnundefined// no server-side validation errors to be reported// ORreturn{user_name: {message: 'messages.validation.invalid_chars',messageArgs: {'only numbers are allowed}
}}// error message to be displayed for 'user_name' field
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Currently, server-side validation is only supportable using a custom save function (https://marmelab.com/react-admin/Validation.html#schema-validation).
While that approach works, it has the following limitations:
transform
property forCreate
) are ignoredDescribe the solution you'd like
Allow for a configurable parameter that can be passed to
Create
andUpdate
components that will translate an error and return it to the form as validation results:Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: