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.

UiTextBox - Allow nulls

See original GitHub issue

I think UiTextBox validation is too strict. passing a v-model with the value of null will trigger a validation error.

data () {
    return {
      name: null
    }
 }
<ui-textbox floating-label label="Name" placeholder="Enter your name" v-model="name"></ui-textbox>
[Vue warn]: Invalid prop: type check failed for prop "value". Expected String, Number, got Null. 
(found in component <ui-textbox> at C:\code\packages\keen-ui\src\UiTextbox.vue)

I believe value.required attribute triggers this. https://github.com/JosephusPaye/Keen-UI/blob/master/src/UiTextbox.vue#L105

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:4
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
JosephusPayecommented, Apr 10, 2017

Support for null will be added in the next version.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Allowing null in int text box with non nullable int - Stack Overflow
I have a form with a number of text boxes bound to int properties in my model. We allow the user to clear...
Read more >
Set Null Value to textbox - MSDN - Microsoft
I have a textbox the may or may not carry a date value. ... Just Check the option "Allow Nulls" In the Table...
Read more >
Don't allow null text box value into user interface dialogue box ...
Don't allow null text box value into user interface dialogue box in setup installer VS2013 ; class ProjectInstaller : System.Configuration.
Read more >
TextBox - How to allow null values when the mask is used
I have a field in a dxForm that I've assigned a mask to, I don't want the field to be required but I...
Read more >
Number Input, Allow null value, how do I set it to null?
In the meantime, one decent workaround would be to set the default value setting of the number input to a temporary state (...
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