egroupware_official/api/js/etemplate/Validators/Regex.ts

14 lines
418 B
TypeScript
Raw Normal View History

2024-05-07 22:46:44 +02:00
import {Pattern} from "./StringValidators"
2022-03-02 22:22:19 +01:00
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);
2022-03-02 22:22:19 +01:00
}
}