Option to treat null values as error
See original GitHub issueHey! First of all thanks for this great library. I hope it will end up in the material-ui core soon 🙂
I would like to be able to display an error when the date input is empty (when keyboard
is true).
I see here that null value are excluded from errors.
One solution I have in mind would be to use the required
prop of the TextField
component to check this. If required
is true, then we should return an error if date value is null.
Finally, we would need a requiredDateMessage
for this.
If this makes sense to you, I can contribute this.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Option to treat null values as error · Issue #549 - GitHub
I would like to be able to display an error when the date input is empty (when keyboard is true). I see here...
Read more >Working with SQL NULL values - SQLShack
This article will show functions and operators for handling SQL NULL values.
Read more >How to Deal With NULL Values in SQL the Right Way
For example, SELECT COALESCE(NULL, NULL, 'red', 'blue', NULL) returns red as it's the first non-NULL value. If all the values are NULL, the...
Read more >How to Deal with NULL Values in Standard SQL
1. Are all rows NULL for some fields? · 2. Is the same number of rows NULL for several fields? · 3. What...
Read more >10 tricks for handling null values in Microsoft Access
#4: Finding or excluding null values handles a potential runtime error when null values exist: If Not IsNull(field) Then ... Although Is Null...
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
Yep, I think no sense in adding new prop
required
so the checking for required is a part of form-management like formik or redux-form. We just should dispatch onChange with proper value when the field is clearedCalling
onChange()
is also fine for me.