From 71d43b125ef621b5d9add5090bd6973e8e48e9da Mon Sep 17 00:00:00 2001 From: nathan Date: Thu, 7 Jul 2022 14:15:00 -0600 Subject: [PATCH] CalendarOwner: Any free entries must be emails so validator added. --- calendar/js/CalendarOwner.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/calendar/js/CalendarOwner.ts b/calendar/js/CalendarOwner.ts index 0aaf28b2d1..77d123eae5 100644 --- a/calendar/js/CalendarOwner.ts +++ b/calendar/js/CalendarOwner.ts @@ -10,6 +10,7 @@ import {Et2Select} from "../../api/js/etemplate/Et2Select/Et2Select"; import {css} from "@lion/core"; +import {IsEmail} from "../../api/js/etemplate/Validators/IsEmail"; /** * Select widget customised for calendar owner, which can be a user @@ -37,6 +38,9 @@ export class CalendarOwner extends Et2Select super(...args); this.searchUrl = "calendar_owner_etemplate_widget::ajax_search"; this.multiple = true; + + // Any free entries must be email addresses + this.defaultValidators.push(new IsEmail()); } /**