Skip to content

Commit

Permalink
Merge pull request #7 from i-tengfei/main
Browse files Browse the repository at this point in the history
Fix required rule when field rules is empty.
  • Loading branch information
supnate authored Apr 18, 2024
2 parents a8ea151 + e44a55b commit 9c45780
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/nice-form-react/src/adapters/antdAdapter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,8 @@ const antdAdapter: NiceFormAdapter = {
rules.unshift({ required: true });
}

(newField as AntdNiceFormField).rules = rules;

if (newField.widgetProps?.fullWidth) {
if (!newField.widgetProps?.style) {
newField.widgetProps.style = {};
Expand Down

0 comments on commit 9c45780

Please sign in to comment.