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