Skip to content

Commit

Permalink
pnp#1775 forgot to update getNumberErrorText method
Browse files Browse the repository at this point in the history
  • Loading branch information
wu.xiaojun committed Feb 29, 2024
1 parent a4bc80d commit 9774e81
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/controls/dynamicForm/dynamicField/DynamicField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -636,10 +636,17 @@ export class DynamicField extends React.Component<IDynamicFieldProps, IDynamicFi
fieldType,
maximumValue,
minimumValue,
showAsPercentage
showAsPercentage,
value,
newValue,
required
} = this.props;

if ((changedValue === undefined || changedValue === '' || changedValue === null || this.isEmptyArray(changedValue)) && this.props.required) {
if (required && newValue!==undefined && (changedValue === undefined || changedValue === '' || changedValue === null || this.isEmptyArray(changedValue)) ) {
return strings.DynamicFormRequiredErrorMessage;
}

if (required && newValue===undefined && (value === undefined || value === '' || value === null || this.isEmptyArray(value)) && (changedValue === undefined || changedValue === '' || changedValue === null || this.isEmptyArray(changedValue)) ) {
return strings.DynamicFormRequiredErrorMessage;
}

Expand Down

0 comments on commit 9774e81

Please sign in to comment.