diff --git a/components/elements/index.js b/components/elements/index.js index 4c329f8c..eb743b3e 100644 --- a/components/elements/index.js +++ b/components/elements/index.js @@ -1245,7 +1245,9 @@ export function NumericField(props) { parentFieldShowOnValue, parentField, } = props; - const required = (value) => (value ? undefined : "Required"); + const required = (value) => { + return value || value == 0 ? undefined : "Requirewwwd"; + }; //parentFieldShowOnValue var showIfHasParentShowValue = @@ -1295,9 +1297,10 @@ export function NumericField(props) { pattern="[0-9]*" inputMode="numeric" parse={Number} - validate={eval(validation)} + validate={[required]} component={RenderTextfield} label={label} + normalize={(value) => parseInt(value)} /> )} @@ -1337,6 +1340,7 @@ export function DecimalField(props) { {parentField != false ? ( showIfHasParentShowValue && (
+ wwww