2022-02-24 18:35:53 +01:00
|
|
|
import {ResultValidator} from "@lion/form-core";
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Manual validator for server-side validation messages passed
|
2022-02-24 23:52:45 +01:00
|
|
|
* from Etemplate. It just gives whatever message is passed in when created.
|
2022-02-24 18:35:53 +01:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
export class ManualMessage extends ResultValidator
|
|
|
|
{
|
|
|
|
static validatorName = "ManualMessage";
|
|
|
|
|
|
|
|
static async getMessage({fieldName, modelValue, formControl, params})
|
|
|
|
{
|
|
|
|
return params;
|
|
|
|
}
|
|
|
|
}
|