Suggestion for a new InputModeAttribute attribute in Data Annotations #108150
Unanswered
Andres10121997
asked this question in
Ideas
Replies: 1 comment 5 replies
-
For numeric fields, the common practice is to define the field in numeric type, instead of string. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello ASP.NET team,
I would like to propose the addition of a new Data Annotation attribute called
InputModeAttribute
, which would allow you to specify the HTML attributeinputmode
in models. This functionality would improve the usability of forms in web applications, providing developers with an easy way to control keyboard behavior on mobile devices.Attribute Details
The
InputModeAttribute
would allow developers to define the input mode to be used in a specific field. This is especially useful in fields such as email, numbers, and searches.Proposed Enumeration
Example of Use
Developers could use the new attribute in their models as follows:
Proceeds
inputmode
throughout the application.Conclusion
I hope this suggestion will be considered for future versions of ASP.NET. I'm open to discussing more about this functionality and getting feedback. Thank you for your attention!
Beta Was this translation helpful? Give feedback.
All reactions