mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 14:41:29 +01:00
efd2159a5f
Also prefix & suffix attribute for Et2Number
14 lines
418 B
TypeScript
14 lines
418 B
TypeScript
import {Pattern} from "./StringValidators"
|
|
|
|
export class Regex extends Pattern
|
|
{
|
|
/**
|
|
* Give a message about this field being required. Could be customised according to MessageData.
|
|
* @param {MessageData | undefined} data
|
|
* @returns {Promise<string>}
|
|
*/
|
|
static async getMessage(data)
|
|
{
|
|
return data.formControl.egw().lang("'%1' does not match the required pattern '%2'", data.modelValue, data.params);
|
|
}
|
|
} |