matching the pattern in the backend (allowing most characters inside
of e-mail addresses.
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
{
xtype: 'combobox',
displayField: 'mail',
- vtype: 'email',
+ vtype: 'proxmoxMail',
allowBlank: false,
valueField: 'mail',
store: {
);
},
});
+
+// 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",
+});