-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: adjusted grade field validation #382
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,12 +14,15 @@ export const AdjustedGradeInput = () => { | |
value, | ||
onChange, | ||
hintText, | ||
possibleGrade, | ||
} = useAdjustedGradeInputData(); | ||
return ( | ||
<span> | ||
<Form.Control | ||
type="text" | ||
type="number" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When I tested this, I was still able to enter non-numeric characters. It could be that this is a Paragon bug. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's strange, I'm sure I tested that 🤔 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe it's because of the different Paragon versions. If I remember correctly - I tested it on Quince |
||
name="adjustedGradeValue" | ||
min="0" | ||
max={possibleGrade || ''} | ||
value={value} | ||
onChange={onChange} | ||
/> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My point was that instead of artificially modifying the number the user was trying to enter, we should show an error message instead. This is so they can understand what the problem was.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it
The proposal makes sense, but I can't say when I'll have time to implement it (too loaded now with other stuff)