u3a-siteworks-development / u3a-siteworks-core

The core plugins
GNU General Public License v2.0
2 stars 1 forks source link

OP1119 - no validation of date format on u3a Notice start or end date #127

Open nicktrosnant opened 11 hours ago

nicktrosnant commented 11 hours ago

There is no validate of date format of the u3a Notice End Date field. There should be a check to confirm that the date is entered in the correct format yyyy-mm-dd.

Probably just needs a 'pattern' setting when defining the metabox field

mnmnk43434 commented 10 hours ago

Hello, we tried to solve the issue.

This is what we did:

Added a 'pattern' setting to the 'Notice End Date' field in the metabox definition to ensure the date is entered in the correct format (yyyy-mm-dd).

You can review changes in this commit: https://github.com/mnmnk43434/u3a-siteworks-development-u3a-siteworks-core-127/commit/db0363a4f8e542f462da0b3e10026596c110492e.

[!CAUTION] Disclaimer: The concept of solution was created by AI and you should never copy paste this code before you check the correctness of generated code. Solution might not be complete, you should use this code as an inspiration only.


If you no longer want Latta AI to attempt solving issues on your repository, you can block this account.

mike99christie commented 7 hours ago

We should copy the format check from the events class. I'm currently too busy to do this myself. Mike C

------ Original Message ------ From: "Nick T" @.> To: "u3a-siteworks-development/u3a-siteworks-core" @.> Cc: "Subscribed" @.***> Sent: 04/12/2024 11:35:28 Subject: [u3a-siteworks-development/u3a-siteworks-core] OP1119 - no validation of date format on u3a Notice start or end date (Issue #127)

There is no validate of date format of the u3a Notice End Date field. There should be a check to confirm that the date is entered in the correct format yyyy-mm-dd.

Probably just needs a 'pattern' setting when defining the metabox field

— Reply to this email directly, view it on GitHub https://github.com/u3a-siteworks-development/u3a-siteworks-core/issues/127, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADIYLLOGDPU6ARQEMNWC7432D3SIBAVCNFSM6AAAAABS76QDNKVHI2DSMVQWIX3LMV43ASLTON2WKOZSG4YTONBVGIZTIOA. You are receiving this because you are subscribed to this thread.Message ID: @.***>