question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Option to treat null values as error

See original GitHub issue

Hey! 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:closed
  • Created 5 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
dmtrKovalenkocommented, Aug 3, 2018

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 cleared

0reactions
ValentinHcommented, Aug 3, 2018

Calling onChange() is also fine for me.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found