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:
parent
a7d84c0a60
commit
6fea57d773
2 changed files with 21 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue