Open xingangsun opened 8 years ago
Thank you for your feedback!!
Useful when trying to display a single message at a time.
Sorry, I could understand. Can you provide the minimum example code please ?
I have two forms, for example, if the first check is not passed, only to return to the first error information, the second form doesn't need to check again until the first check passed
I've ran into the same need. My use case was a field that is required and needs to be a number. When left empty I want just the required message displayed. If the field is filled out but not a number I want to display a error that a number needs to be entered.
Yes I have the same use-case like this.
I don't want to show two error messages at the same time.
I've ran into the same need too!
Echoing everything everyone else has already said on this thread. This would be a nice feature if it's not already supported.
This could be easily solved if Vue.js had a better way of doing "else-if". Unfortunately, Evan recommended this method which is pretty ugly and not maintainable if you have a lot of validations: https://forum.vuejs.org/topic/1107/%E8%AF%B7%E9%97%AE%E5%A6%82%E4%BD%95%E5%AE%9E%E7%8E%B0-elseif-%E7%9A%84%E6%95%88%E6%9E%9C/2
a workaround:
<span v-text="$validatorName.fieldName.errors ? $validatorName.fieldName.errors[0].message : ''"></span>
hope the single-error-msg feature to be added.
Second this feature.
How can I returns the first message for a vue-validator field. Useful when trying to display a single message at a time.