microsoft / fluentui

Fluent UI web represents a collection of utilities, React components, and web components for building web applications.
https://react.fluentui.dev
Other
18.48k stars 2.73k forks source link

[Bug]: Customizable Masked TextField - Doesn't work react-hook-form yup validation #26474

Closed mitrichy20000 closed 1 year ago

mitrichy20000 commented 1 year ago

Library

React Northstar / v0 (@fluentui/react-northstar)

System Info

npm i

Are you reporting Accessibility issue?

None

Reproduction

ok

Bug Description

Actual Behavior

fill this out

<Controller name="min" control={control} render={({ field: { onChange, value,ref } }) => ( <MaskedTextField maskFormat={{ "*": /[0-9.,-]/, }} value={value} onChange={onChange} inputRef={ref} className="inputStyle" /> )} />

const { control, handleSubmit, watch, setValue, reset, register, formState: { errors }, } = useForm({ mode: "onBlur", resolver: yupResolver(validationSchema), });

Expected Behavior

I want validation for maskedTextfield using react-hook-form validation

Logs

No response

Requested priority

Blocking

Products/sites affected

No response

Are you willing to submit a PR to fix?

yes

Validations

layershifter commented 1 year ago

@mitrichy20000 can you please provide a repro on CodeSandbox?

msft-fluent-ui-bot commented 1 year ago

This issue has been automatically marked as stale because it has marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for your contributions to Fluent UI!