Add auto trim property to text form components such as MudTextField
See original GitHub issueFeature request type
Enhance component
Component name
MudTextField
Is your feature request related to a problem?
No response
Describe the solution you’d like
I know auto trim can be easily accomplished via ValueChanged
, but adding these to dozens of text form controls can become cumbersome. It’d be very nice if we can keep using @bind-Value along with a new property AutoTrim
to automatically trim user inputs before triggering any validation/submission logic.
Have you seen this feature anywhere else?
No response
Describe alternatives you’ve considered
No response
Pull Request
- I would like to do a Pull Request
Code of Conduct
- I agree to follow this project’s Code of Conduct
Issue Analytics
- State:
- Created 2 years ago
- Comments:13 (6 by maintainers)
Top Results From Across the Web
Trim() input value of any TextField in a Form by default in ...
This will only work if spaces in between are disallowed. Trim the text value on onChanged callback and assign it back to the...
Read more >MudTextField ValueChanged event doesn't fire when ...
I'm building a dynamic forms application and I'm trying to nest components within components and allow their events to bubble up to the...
Read more >Trim text before submit form - Power Platform Community
Solved: Hi, Is it possible to trim the text that user input before submit form? I tried with "Field.Text = trim(Field.Text)" and update....
Read more >Untitled
onChanged property - TextField class - material library My First .Net MAUI App - Medium How to get the changed value in Input...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Example for a trimming converter. Conversion is done before validation: https://try.mudblazor.com/snippet/QOccaCOHTqWgnlHx
Please inform if this approach fails.