mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-25 12:21:26 +02:00
also allow / and # in every position of placeholder name
This commit is contained in:
parent
649645ab0f
commit
f957656f92
@ -32,10 +32,11 @@ export class IsEmail extends Pattern
|
|||||||
* - "{{email}}"
|
* - "{{email}}"
|
||||||
* - "{{n_fn}} <{{email}}"
|
* - "{{n_fn}} <{{email}}"
|
||||||
* - "{{#<custom-field-name>}}"
|
* - "{{#<custom-field-name>}}"
|
||||||
|
* - "{{info_contact/email}}" or "{{user/#<custom-field-name}}"
|
||||||
* - we do NOT check if the placeholder is implemented by addressbook or a valid custom-field name!
|
* - we do NOT check if the placeholder is implemented by addressbook or a valid custom-field name!
|
||||||
* - "test" or "{test}}" are NOT valid
|
* - "test" or "{test}}" are NOT valid
|
||||||
*/
|
*/
|
||||||
static EMAIL_PLACEHOLDER_PREG = new RegExp('^(.*{{#?[a-z0-9_]+}}.*|'+IsEmail.EMAIL_PREG.source.substr(1, IsEmail.EMAIL_PREG.source.length-2)+')$', 'i');
|
static EMAIL_PLACEHOLDER_PREG = new RegExp('^(.*{{[a-z0-9_/#]+}}.*|'+IsEmail.EMAIL_PREG.source.substr(1, IsEmail.EMAIL_PREG.source.length-2)+')$', 'i');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user