egroupware_official/api/js/etemplate/Validators/Regex.ts
nathan efd2159a5f * Add masking to Et2Textbox & Et2Number
Also prefix & suffix attribute for Et2Number
2024-08-02 16:24:52 -06:00

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);
}
}