-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UseInput isRequired and meta error #5122
Comments
Hi, and thanks for your question. As explained in the react-admin contributing guide, the right place to ask a "How To" question, get usage advice, or troubleshoot your own code, is StackOverFlow. This makes your question easy to find by the core team, and the developer community. Unlike Github, StackOverFlow has great SEO, gamification, voting, and reputation. That's why we chose it, and decided to keep GitHub issues only for bugs and feature requests. So I'm closing this issue, and inviting you to ask your question at: http://stackoverflow.com/questions/tagged/react-admin And once you get a response, please continue to hang out on the react-admin channel in StackOverflow. That way, you can help newcomers and share your expertise! |
Hello, Is it possible to change it and let the choice at developer ? for example :
|
Yes, can you create a PR ? |
Ok, I'll try to do it if I have time to fork project and improve that. Regards, |
No problem. As this will be a new feature, please target the |
Is your feature request related to a problem? Please describe.
I have an HOC to manage multilangue on TextInput and I would like my text input display my error message and add required on label message.
I override name of TextInput with 'source+language selected'.
I have a required validate function with default language which verify the default language is setted.
structure :
{ fr: "mon texte", en : "my text"}
If I pass my custom required validate function to textinput :
the value send to validator is only "mon texte" and display error all the time.
If I remove this validate, my validator works but the error is not displayed. Moreover, the label hasn't got the required option.
Describe the solution you'd like
I would like the isRequired is initialized like input or meta in useInput :
Manage the display error if my text input receive error message in meta props.
Additional context
It's complicated to add an source example because it's a large project.
The text was updated successfully, but these errors were encountered: