Bug 34497: (QA follow-up):Fix required text field
input.value can be either null (if flatpickr date field empty) or '' (if simple text input empty), so account for both situations. Add missing 'required' attribute to text inputs. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
4416a6ed35
commit
84268b66ae
1 changed files with 4 additions and 1 deletions
|
@ -38,6 +38,7 @@
|
|||
v-if="input.type == 'Text'"
|
||||
:id="`confirmation_input_${input.id}`"
|
||||
v-model="input.value"
|
||||
:required="input.required"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -87,7 +88,9 @@ export default {
|
|||
if (
|
||||
this.confirmation.inputs &&
|
||||
this.confirmation.inputs.filter(
|
||||
input => input.required && input.value == null
|
||||
input =>
|
||||
input.required &&
|
||||
(input.value == null || input.value == "")
|
||||
).length
|
||||
) {
|
||||
this.$refs.confirmationform.reportValidity()
|
||||
|
|
Loading…
Reference in a new issue