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.

Ability to set error state for text field via parameter

See original GitHub issue

I think rules prop of v-text-field is unnecessary functionality, because in most cases we have to validate our form values not in text fields components. Just imagine if you need to disable submit button before all you inputs do not have errors. With current v-text-field api you have to run validations twice. So, I suggest add new boolean prop error to v-text-field. If error is true the field should look like field with error.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:17 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
johnleidercommented, Jun 3, 2017

I’ve added the ability to manually set the error state and even pass in a string or array of strings for your own custom errors. The errors prop will not trigger component validation.

1reaction
johnleidercommented, Jun 8, 2017

I like errorMessages. I’ll do that tonight.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Validating Input | Web Accessibility Initiative (WAI) - W3C
Custom validation needs to notify users in an accessible way as described in the User Notifications part of this tutorial. Client-side validation alone...
Read more >
Showing an error under a TextField in Flutter - Stack Overflow
You show errors based on the validation results which are returned by the validator function provided by TextFormField, You check for some ...
Read more >
<input>: The Input (Form Input) element - HTML
A field for editing an email address. Looks like a text input, but has validation parameters and relevant keyboard in supporting browsers and ......
Read more >
Show custom error on lightning:input
From the docs: This component supports the following methods. focus(): Sets focus on the element. setCustomValidity(): Sets the custom error message.
Read more >
Errors function in Power Apps - Power Platform - Microsoft Learn
Record. The record in the data source that had the error. If the error occurred during the creation of a record, this column...
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