mirror of
https://git.proxmox.com/git/pmg-gui
synced 2025-08-17 19:25:57 +00:00
utils: add custom validator for pmg-email-address
matching the pattern in the backend (allowing most characters inside of e-mail addresses. Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
This commit is contained in:
parent
ea785e3f7b
commit
845efd4177
@ -127,7 +127,7 @@ Ext.define('PMG.UserBlackWhiteList', {
|
|||||||
{
|
{
|
||||||
xtype: 'combobox',
|
xtype: 'combobox',
|
||||||
displayField: 'mail',
|
displayField: 'mail',
|
||||||
vtype: 'email',
|
vtype: 'proxmoxMail',
|
||||||
allowBlank: false,
|
allowBlank: false,
|
||||||
valueField: 'mail',
|
valueField: 'mail',
|
||||||
store: {
|
store: {
|
||||||
|
@ -898,3 +898,12 @@ Ext.define('PMG.Async', {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// custom Vtypes
|
||||||
|
Ext.apply(Ext.form.field.VTypes, {
|
||||||
|
// matches the pmg-email-address in pmg-api
|
||||||
|
PMGMail: function(v) {
|
||||||
|
return (/[^\s\\@]+@[^\s/\\@]+/).test(v);
|
||||||
|
},
|
||||||
|
PMGMailText: gettext('Example') + ": user@example.com",
|
||||||
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user