From e7f10c711c509d52972b07fe9c1490b2c63527c8 Mon Sep 17 00:00:00 2001 From: nathan Date: Wed, 8 Mar 2023 13:28:04 -0700 Subject: [PATCH] Fix numeric validator on a Et2Number would not pass --- api/js/etemplate/Et2InputWidget/Et2InputWidget.ts | 2 +- api/js/etemplate/Et2Textbox/Et2Number.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/js/etemplate/Et2InputWidget/Et2InputWidget.ts b/api/js/etemplate/Et2InputWidget/Et2InputWidget.ts index efe6f3e48a..c206b0c983 100644 --- a/api/js/etemplate/Et2InputWidget/Et2InputWidget.ts +++ b/api/js/etemplate/Et2InputWidget/Et2InputWidget.ts @@ -535,7 +535,7 @@ const Et2InputWidgetMixin = >(superclass : T) validators.map(async validator => { - let values = this.value; + let values = this.getValue(); if(!Array.isArray(values)) { values = [values]; diff --git a/api/js/etemplate/Et2Textbox/Et2Number.ts b/api/js/etemplate/Et2Textbox/Et2Number.ts index 8b8070a785..ff378aa3e1 100644 --- a/api/js/etemplate/Et2Textbox/Et2Number.ts +++ b/api/js/etemplate/Et2Textbox/Et2Number.ts @@ -101,7 +101,7 @@ export class Et2Number extends Et2Textbox val = parseFloat(val); } } - return val; + return val + ""; } } // @ts-ignore TypeScript is not recognizing that Et2Textbox is a LitElement