Skip to content

Commit

Permalink
Amend templates to have correct error class
Browse files Browse the repository at this point in the history
  • Loading branch information
jaucourt committed Nov 15, 2024
1 parent 63ef199 commit 77f0833
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,21 +47,21 @@
{
label: mssgs.dob_day,
name: 'day',
classes: "govuk-input--width-2 govuk-input--error" if error['day'] or error['date-of-birth'] else "govuk-input--width-2",
classes: "govuk-input--width-2 govuk-input--error" if error['full-date'] or error['day-and-month'] or error['day-and-year'] or error['day'] or error['invalid-date'] or error['birthDate'] else "govuk-input--width-2",
value: payload['date-of-birth-day'],
attributes: { maxlength : 2 }
},
{
label: mssgs.dob_month,
name: 'month',
classes: "govuk-input--width-2 govuk-input--error" if error['month'] else "govuk-input--width-2",
classes: "govuk-input--width-2 govuk-input--error" if error['full-date'] or error['day-and-month'] or error['month-and-year'] or error['month'] or error['invalid-date'] or error['birthDate'] else "govuk-input--width-2",
value: payload['date-of-birth-month'],
attributes: { maxlength : 2 }
},
{
label: mssgs.dob_year,
name: 'year',
classes: "govuk-input--width-4 govuk-input--error" if error['year'] else "govuk-input--width-4",
classes: "govuk-input--width-4 govuk-input--error" if error['full-date'] or error['month-and-year'] or error['day-and-year'] or error['year'] or error['invalid-date'] or error['birthDate'] else "govuk-input--width-4",
value: payload['date-of-birth-year'],
attributes: { maxlength : 4 }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,21 +46,21 @@
{
name: "day",
label: mssgs.dob_day,
classes: "govuk-input--width-2",
classes: "govuk-input--width-2 govuk-input--error" if error['full-date'] or error['day-and-month'] or error['day-and-year'] or error['day'] or error['invalid-date'] or error['birthDate'] else "govuk-input--width-2",
value: payload['licence-start-date-day'],
attributes: { maxlength : 2 }
},
{
name: "month",
label: mssgs.dob_month,
classes: "govuk-input--width-2",
classes: "govuk-input--width-2 govuk-input--error" if error['full-date'] or error['day-and-month'] or error['month-and-year'] or error['month'] or error['invalid-date'] or error['birthDate'] else "govuk-input--width-2",
value: payload['licence-start-date-month'],
attributes: { maxlength : 2 }
},
{
name: "year",
label: mssgs.dob_year,
classes: "govuk-input--width-4",
classes: "govuk-input--width-4 govuk-input--error" if error['full-date'] or error['month-and-year'] or error['day-and-year'] or error['year'] or error['invalid-date'] or error['birthDate'] else "govuk-input--width-4",
value: payload['licence-start-date-year'],
attributes: { maxlength : 4 }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,21 +63,21 @@
{
label: mssgs.dob_day,
name: "day",
classes: "govuk-input--width-2 govuk-input--error" if error['day'] or error['date-of-birth'] else "govuk-input--width-2",
classes: "govuk-input--width-2 govuk-input--error" if error['full-date'] or error['day-and-month'] or error['day-and-year'] or error['day'] or error['invalid-date'] or error['birthDate'] else "govuk-input--width-2",
value: payload['date-of-birth-day'],
attributes: { maxlength : 2 }
},
{
label: mssgs.dob_month,
name: "month",
classes: "govuk-input--width-2 govuk-input--error" if error['month'] else "govuk-input--width-2",
classes: "govuk-input--width-2 govuk-input--error" if error['full-date'] or error['day-and-month'] or error['month-and-year'] or error['month'] or error['invalid-date'] or error['birthDate'] else "govuk-input--width-2",
value: payload['date-of-birth-month'],
attributes: { maxlength : 2 }
},
{
label: mssgs.dob_year,
name: "year",
classes: "govuk-input--width-4 govuk-input--error" if error['year'] else "govuk-input--width-4",
classes: "govuk-input--width-4 govuk-input--error" if error['full-date'] or error['month-and-year'] or error['day-and-year'] or error['year'] or error['invalid-date'] or error['birthDate'] else "govuk-input--width-4",
value: payload['date-of-birth-year'],
attributes: { maxlength : 4 }
}
Expand Down

0 comments on commit 77f0833

Please sign in to comment.