Get needed attribute working

Will cancel submit, shows validation message
This commit is contained in:
nathan
2022-02-24 15:52:45 -07:00
parent ce84dd753a
commit d9e95dae87
7 changed files with 133 additions and 25 deletions

View File

@@ -0,0 +1,16 @@
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;
}
}