bcgov / bcgov/entity

PPR UI - Debtor Birthdate Validation issue

Open
#15,381 1 comment 0 reactions 0 assignees View on GitHub
Assets bug PPR Priority2
Dominant language
JavaScript
Stars
23
Forks
62
Avg merge
24m
Merged PRs (30d)
1

Description

**Describe the bug in the current situation:**
When a user enters the day as 31 for the month which is not (eg. Feb), then the validation message is not displayed in the birthdate field.

**Link bug to the User Story:**

**Impact of this bug:**
It would impact when the users enter incorrect birthdate

**Chance of Occurring (high/medium/low/very low):**
Low

**Pre Conditions:**

**Steps to Reproduce:**
- Login to the PPR account
- Start a PPR registration (eg: Security Agreement)
- Navigate to Step2 (Secured Parties and Debtors)
- Scroll to the Debtor section and Add an Ind. Debtor
- Enter the birthdate for the months which don't have 31 (Feb, April, June, Aug, Sep, Nov)
- Click on the done button
- The date will automatically convert to the next day

**Expected behavior:**
When the user enters an invalid birthdate, then the validation/error message should be displayed on the UI.

**Screenshots/ Visual Reference/ Source:**
![image.png](https://images.zenhubusercontent.com/60cd147b9008de277d1a6814/d774e513-c4a7-4f58-a212-07a129d1ca8a)

![image.png](https://images.zenhubusercontent.com/60cd147b9008de277d1a6814/f67f48a7-2aa9-44dd-aaf6-7cfaf805c252)

**Birthdate Validations:**

For birthdate if the user enters a value for one field the other fields are required and must be valid.
Day must be a number between 1 and 31. Invalid message "Enter a valid day"
Year must begin with 1 or 2, must be four digits. Invalid message ""
Future versions can implement more specific date logic (e.g., if Feb, day must between 1 and 29, year must begin with 18, 19, or 20)
If month is not selected, display "Select a month"

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.