mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-05 14:20:40 +01:00
15 lines
446 B
TypeScript
15 lines
446 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)
|
|
{
|
|
// TODO: This is a poor error message, it shows the REGEX
|
|
return data.formControl.egw().lang("'%1' has an invalid format !!!", data.params);
|
|
}
|
|
} |