-
Notifications
You must be signed in to change notification settings - Fork 1
HEEDLS-553 Date Input Validation #497
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
Conversation
…validation in WelcomeEmail VM New DateValidator class will replace existing DateValidator class
Keep this helper class around for existing usage in Learning Portal (to be refactored later in 560)
…g to create Date object
…cept custom css; fix bug
… dates Also remove an unneeded year check which resulted in a potentially confusing error message
DanBloxham-sw
left a comment
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.
Few minor comments, but pretty good overall.
DigitalLearningSolutions.Web/Views/Shared/Components/DateInput/Default.cshtml
Outdated
Show resolved
Hide resolved
DigitalLearningSolutions.Web/ViewComponents/DateInputViewComponent.cs
Outdated
Show resolved
Hide resolved
DigitalLearningSolutions.Web/ControllerHelpers/DateValidator.cs
Outdated
Show resolved
Hide resolved
DigitalLearningSolutions.Web/ControllerHelpers/DateValidator.cs
Outdated
Show resolved
Hide resolved
stellake
left a comment
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.
Would be good to share this at knowledge sharing next week so the team is aware of the existence of this component 👍
DigitalLearningSolutions.Web.Tests/ControllerHelpers/DateValidatorTests.cs
Outdated
Show resolved
Hide resolved
DigitalLearningSolutions.Web/ControllerHelpers/DateValidator.cs
Outdated
Show resolved
Hide resolved
DigitalLearningSolutions.Web/ControllerHelpers/DateValidator.cs
Outdated
Show resolved
Hide resolved
...lLearningSolutions.Web/ViewModels/Register/RegisterDelegateByCentre/WelcomeEmailViewModel.cs
Outdated
Show resolved
Hide resolved
...lLearningSolutions.Web/ViewModels/Register/RegisterDelegateByCentre/WelcomeEmailViewModel.cs
Outdated
Show resolved
Hide resolved
DigitalLearningSolutions.Web/ControllerHelpers/DateValidator.cs
Outdated
Show resolved
Hide resolved
…d values in dates
…d comment about duplicate error messages
DigitalLearningSolutions.Web.Tests/ControllerHelpers/DateValidatorTests.cs
Show resolved
Hide resolved
stellake
left a comment
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.
Looks good! 👍
…S-553-date-input-validation" This reverts commit 210a193.
…ng/HEEDLS-553-date-input-validation"" This reverts commit 8753fb7.
Refactored/rewrote/tidied up DateValidator, DateInputVC, and WelcomeEmail. Date input errors are now model state errors, compatible with error summary and treated in a similar way to normal text input errors. Errors are identified and indicated correctly. Error messages are more appropriate and correct.