Add required field indicators to forms - #653
Open
eicyer wants to merge 3 commits into
Open
Conversation
improve UX. Updated Label component to support `required` prop and added indicators to employee, location, ride, and rider forms. MUI components use `required` prop; DatePicker/TimePicker use asterisks in label strings.
Member
|
[diff-counting] Significant lines: 141. |
Closed
anika-4444
reviewed
Jan 6, 2026
| </div> | ||
| <div className={styles.col2}> | ||
| <Label htmlFor="phoneNumber">Phone Number</Label> | ||
| <Label htmlFor="phoneNumber" required>Phone Number</Label> |
Contributor
| <Label htmlFor="startDate" required>Start Date:</Label> | ||
| <Input | ||
| id="startDate" | ||
| type="date" |
Contributor
There was a problem hiding this comment.
I think I saw someone make a comment about this but I can't remember where or when (so please ignore if this has already been dealt with) but should we also make selecting a role mandatory in this modal?
| <div className={styles.box}> | ||
| <div className={styles.errorBox}> | ||
| <Label className={styles.label} id="pickupLocation"> | ||
| <Label className={styles.label} id="pickupLocation" required> |
Contributor
There was a problem hiding this comment.
Note for the future: Once my PR editing the way custom locations (regular text field instead of an address picker) are dealt with is merged, this component is going to look slightly different. We should make sure the required indicators still work correctly once this happens.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Added visual indicators to required form fields across the application. Updated Label component to support required prop and added indicators to employee, location, ride, and rider forms. MUI components
This pull request is the first step towards having asterisks in required form fields.
Test Plan
I tested manually.

Notes
I initially branched off another PR by mistake; this PRis rebased onto
masterand now contains only the required-field UI changes