-
Notifications
You must be signed in to change notification settings - Fork 9
Closed
Description
Overview
In the hacker account form, change the birthdate field to age field. Validate that it is between 0 and 100. Allow users to edit their age field after account creation.
Technical Details
-
Replace all mentions "birthDate" with "age"
-
Remove conversions of input to date
- Ex: In
const convertFormikToAccount = (, changedbirthDate: input2date(values.birthDate),toage: values.age,
- Ex: In
-
For the front-end form, in
dashboard\src\features\Account\ManageAccountForm.tsx:- Change
format="##/##/####"toformat="##"to match a 2-digit age - Remove
placeholder="MM/DD/YYYY" - Remove
disabled={props.mode === ManageAccountModes.EDIT}since without a function to update age based on birth date, age may need to be edited by user.
- Change
-
Change validation of the field in
dashboard\src\features\Account\validationSchema.ts- Change type from
birthDate: string()toage: number() - Validate that age is between 0 and 100
- Change type from
Metadata
Metadata
Assignees
Labels
No labels