From 9d1f816002221728e58fa3bc7f01acbb618808af Mon Sep 17 00:00:00 2001 From: Andrew Croce Date: Fri, 10 Aug 2018 13:36:07 -0400 Subject: [PATCH] Make sure initial server-side errors take precedence and invalidate fields --- js/components/text_input.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/js/components/text_input.js b/js/components/text_input.js index baa07d83..06eb100c 100644 --- a/js/components/text_input.js +++ b/js/components/text_input.js @@ -72,7 +72,11 @@ export default { // _checkIfValid: function ({ value, invalidate = false}) { // Validate the value - const valid = this._validate(value) + let valid = this._validate(value) + + if (this.initialErrors && this.initialErrors.length) { + valid = false + } // Show error messages or not if (valid) {