acdh-oeaw / dhcr-main

Digital Humanities Course Registry Application
https://dhcr.clarin-dariah.eu/
Apache License 2.0
3 stars 0 forks source link

Add server-side start date validation #96

Closed patrickakk closed 3 months ago

patrickakk commented 10 months ago

Al tough the JavaScript pop-up does validation, it seems to be possible to enter an invalid date, when entering a new course, see screenshot. image

patrickakk commented 10 months ago

Note: I've converted the date to a valid format, so the NaN disappeared now. The bug remains.

patrickakk commented 9 months ago

Proposed solution: Require JavaScript for the course add and edit page.

patrickakk commented 9 months ago

Waiting for bug report.

patrickakk commented 9 months ago

No bug report received.

patrickakk commented 3 months ago

New solution: Add server-side start date validation

All the start dates provided by the user will be checked, one by one, on the server side. This makes it independent from JavaScript or other browser or user dependent items.

Note: default validation by the framework wasn't possible since this field is an array converted to and stored as a string (legacy).

patrickakk commented 3 months ago

@IvdL22 @PixlTracer The validation has been implemented. Visible items for the users are:

New explanation

image

Updated error message

image

Explanation at field

image

It will be available in the test instance tomorrow. (Not today).

Can you change the label to Done if you agree with the solution?

IvdL22 commented 3 months ago

great, thank you @patrickakk

patrickakk commented 3 months ago

Implemented in 2024-05