Skip to content

Commit

Permalink
🫥 close #10348 stop shouldUseNativeValidation pass down constraint props
Browse files Browse the repository at this point in the history
  • Loading branch information
bluebill1049 committed Apr 27, 2023
1 parent d68ef91 commit 6eb85b7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/__tests__/useForm.server.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ describe('useForm with SSR', () => {
};

expect(renderToString(<App />)).toEqual(
'<div><input required="" min="2" max="2" minLength="2" maxLength="2" name="test"/></div>',
'<div><input name="test"/></div>',
);
});

Expand Down
2 changes: 1 addition & 1 deletion src/logic/createFormControl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -962,7 +962,7 @@ export function createFormControl<

return {
...(disabledIsDefined ? { disabled: options.disabled } : {}),
...(_options.shouldUseNativeValidation || _options.progressive
...(_options.progressive
? {
required: !!options.required,
min: getRuleValue(options.min),
Expand Down

0 comments on commit 6eb85b7

Please sign in to comment.