mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-25 04:11:49 +02:00
Et2Textbox: Also accept RegExp as validator
Previously only accepted string
This commit is contained in:
parent
ac3c50adef
commit
b8b52d5a72
@ -90,7 +90,7 @@ export class Et2Textbox extends Et2InputWidget(SlInput)
|
||||
return this.__validator;
|
||||
}
|
||||
|
||||
set validator(value)
|
||||
set validator(value : string | RegExp)
|
||||
{
|
||||
if(typeof value == 'string')
|
||||
{
|
||||
@ -106,6 +106,11 @@ export class Et2Textbox extends Et2InputWidget(SlInput)
|
||||
|
||||
this.requestUpdate("validator");
|
||||
}
|
||||
else if(value instanceof RegExp)
|
||||
{
|
||||
this.__validator = value;
|
||||
this.requestUpdate("validator");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user