mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-25 17:33:49 +01:00
Only validate that the free entries are email addresses on calendarowner, not every value
This commit is contained in:
parent
9ebc1e8f15
commit
3e83c5bb1c
@ -38,9 +38,6 @@ export class CalendarOwner extends Et2Select
|
|||||||
super(...args);
|
super(...args);
|
||||||
this.searchUrl = "calendar_owner_etemplate_widget::ajax_search";
|
this.searchUrl = "calendar_owner_etemplate_widget::ajax_search";
|
||||||
this.multiple = true;
|
this.multiple = true;
|
||||||
|
|
||||||
// Any free entries must be email addresses
|
|
||||||
this.defaultValidators.push(new IsEmail());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -91,6 +88,22 @@ export class CalendarOwner extends Et2Select
|
|||||||
}, this, true, this).sendRequest();
|
}, this, true, this).sendRequest();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a free entry value is acceptable.
|
||||||
|
* We only check the free entry, since value can be mixed.
|
||||||
|
*
|
||||||
|
* @param text
|
||||||
|
* @returns {boolean}
|
||||||
|
*/
|
||||||
|
public validateFreeEntry(text) : boolean
|
||||||
|
{
|
||||||
|
let validators = [...this.validators, new IsEmail()];
|
||||||
|
let result = validators.filter(v =>
|
||||||
|
v.execute(text, v.param, {node: this}),
|
||||||
|
);
|
||||||
|
return result.length == 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
customElements.define("calendar-owner", CalendarOwner);
|
customElements.define("calendar-owner", CalendarOwner);
|
Loading…
Reference in New Issue
Block a user