Update valid prop on MultiCheckboxInput to return true if the field is optional
This commit is contained in:
parent
62cdcbe6dc
commit
20a2abd36b
@ -14,6 +14,7 @@ export default {
|
||||
default: () => [],
|
||||
},
|
||||
initialOtherValue: String,
|
||||
optional: Boolean,
|
||||
},
|
||||
|
||||
data: function() {
|
||||
@ -45,7 +46,7 @@ export default {
|
||||
|
||||
computed: {
|
||||
valid: function() {
|
||||
return this.showValid
|
||||
return this.optional || this.showValid
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -11,6 +11,7 @@
|
||||
{% if other_input_field and other_input_field.data and other_input_field.data != "None" %}
|
||||
initial-other-value="{{ other_input_field.data }}"
|
||||
{% endif %}
|
||||
v-bind:optional={{ optional|lower }}
|
||||
key='{{ field.name }}'>
|
||||
<div
|
||||
v-bind:class="['usa-input', { 'usa-input--error': showError, 'usa-input--success': showValid }]">
|
||||
|
Loading…
x
Reference in New Issue
Block a user