mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 16:48:49 +01:00
Et2Textbox: Also accept RegExp as validator
Previously only accepted string
This commit is contained in:
parent
e583de2bce
commit
7d07539f10
@ -131,7 +131,7 @@ export class Et2Textbox extends Et2InputWidget(SlInput)
|
||||
return this.__validator;
|
||||
}
|
||||
|
||||
set validator(value)
|
||||
set validator(value : string | RegExp)
|
||||
{
|
||||
if(typeof value == 'string')
|
||||
{
|
||||
@ -147,6 +147,11 @@ export class Et2Textbox extends Et2InputWidget(SlInput)
|
||||
|
||||
this.requestUpdate("validator");
|
||||
}
|
||||
else if(value instanceof RegExp)
|
||||
{
|
||||
this.__validator = value;
|
||||
this.requestUpdate("validator");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user