1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-20 13:29:37 +02:00

chore: Add validation for start and end dates in collection forms

This commit is contained in:
Sean Morley 2024-08-19 16:49:27 -04:00
parent a7d84c0a60
commit 6fea57d773
2 changed files with 21 additions and 0 deletions

View file

@ -53,6 +53,11 @@
return;
}
if (newCollection.start_date && !newCollection.end_date) {
addToast('error', 'Please provide an end date');
return;
}
const response = await fetch(form.action, {
method: form.method,
body: formData