Skip to content

Commit

Permalink
(fix) Correct regex pattern for 12-hour time validation (#448)
Browse files Browse the repository at this point in the history
Removes an unnecessary closing parenthesis in the date field's time validation regex pattern.
  • Loading branch information
denniskigen authored Dec 11, 2024
1 parent 611e050 commit fac66fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/inputs/date/date.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ const DateField: React.FC<FormFieldInputProps> = ({ field, value: dateValue, err
id={field.id}
labelText={timePickerLabel}
placeholder="HH:MM"
pattern="(1[012]|[1-9]):[0-5][0-9])$"
pattern="(1[012]|[1-9]):[0-5][0-9]$"
type="time"
disabled={field.datePickerFormat === 'timer' ? field.isDisabled : !dateValue ? true : false}
invalid={errors.length > 0}
Expand Down

0 comments on commit fac66fd

Please sign in to comment.