jwpf100 / node-blog

Blogging App - CRUD backend for Admin to add, amend and delete articles. API to pass data on to Frontend. Express used for routing. MongoDB for storage. Hosted on AWS using NginX reverse proxy.
0 stars 0 forks source link

Bug - Create Author removes date of birth/death on error #21

Closed jwpf100 closed 3 years ago

jwpf100 commented 3 years ago

User Experience

jwpf100 commented 3 years ago

Issue is with the date format. When there is an error, the date is just passed from the form, which leaves it in the wrong format:

create:1 The specified value "2020-11-20T00:00:00.000Z" does not conform to the required format, "yyyy-MM-dd".

I'd need to add a function somewhere to change it, either within the template, or before it gets passed to the template.