defect 10834

This commit is contained in:
2024-04-11 14:03:24 +01:00
parent 6ed1d36c3c
commit 72a540436b
+6 -2
View File
@@ -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)}
/>
</div>
)}
@@ -1337,6 +1340,7 @@ export function DecimalField(props) {
{parentField != false ? (
showIfHasParentShowValue && (
<div className="govuk-form-group">
wwww
<Field
name={props.name}
id={props.name}