2024-05-07 22:46:44 +02:00
|
|
|
import {Validator} from "./Validator";
|
2022-02-24 18:35:53 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 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
|
|
|
*
|
|
|
|
*/
|
2024-05-07 22:46:44 +02:00
|
|
|
export class ManualMessage extends Validator
|
2022-02-24 18:35:53 +01:00
|
|
|
{
|
2022-03-04 23:37:22 +01:00
|
|
|
static get validatorName()
|
|
|
|
{
|
|
|
|
return "ManualMessage";
|
|
|
|
}
|
2022-02-24 18:35:53 +01:00
|
|
|
|
|
|
|
static async getMessage({fieldName, modelValue, formControl, params})
|
|
|
|
{
|
|
|
|
return params;
|
|
|
|
}
|
|
|
|
}
|