egroupware/api/js/etemplate/Validators/ManualMessage.ts
nathan d9e95dae87 Get needed attribute working
Will cancel submit, shows validation message
2022-02-24 15:53:40 -07:00

16 lines
392 B
TypeScript

import {ResultValidator} from "@lion/form-core";
/**
* Manual validator for server-side validation messages passed
* from Etemplate. It just gives whatever message is passed in when created.
*
*/
export class ManualMessage extends ResultValidator
{
static validatorName = "ManualMessage";
static async getMessage({fieldName, modelValue, formControl, params})
{
return params;
}
}