在React Admin中设置最大表单字段长度
是否有某种方法可以在a simpleform“> simpleform”>内部设置一个字段。 href =“ https://www.npmjs.com/package/reaeact-admin” rel =“ nofollow noreferrer”> react-admin 限制用户可以输入该字段的字符数量?
基于 docs ,React-Admin框架本身似乎不包含此功能。有验证当用户键入太多字符时,可以显示错误的功能,但显然显然是没有内置的方式来限制键入的字符数。鉴于此,有人是否通过其他方式实现了这一目标?
例如,假设“状态”字段的有效值仅是“ a”,“ b”或“ c”。在使用React-Admin时,如何将表单字段仅接受1个字符?
Is there some way to set a field in a SimpleForm within React-Admin to limit the number of characters a user can type into that field?
Based on the docs, the React-Admin framework itself does not appear to contain this functionality. There is validation functionality to show an error when the user types too many characters, but apparently no built-in way to limit the number of characters typed. Given this, has anyone achieved this via other means?
For example, say the valid values for a 'Status' field are only 'A', 'B' or 'C'. How, while using React-Admin, would you limit that form field to accept only 1 character?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这与Adv-Admin无关,但是您可以去:
This is not strictly related to react-admin, but here you go: