Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(select/radio): Support oneOf[].pattern validation #47

Conversation

davelange
Copy link
Contributor

Add oneOf pattern validation.

  • If the options in a oneOf contain a value, validation remains the same as it currently is.
  • If the options contain a regex pattern, use that to test the value.

How:

  • Update radioOrSelect yup schema
  • Add test

@davelange davelange marked this pull request as ready for review October 16, 2023 12:38
@brennj
Copy link
Collaborator

brennj commented Oct 18, 2023

Seems to work well, awesome work. If you can open an MR internally and ensure it passes our tests for our components, will be happy to approve this! Ping me if you need any support releasing a dev package to test

package.json Outdated Show resolved Hide resolved
@davelange davelange force-pushed the pc-107-emergency-contact-phone_number-api-validation-is-not-great branch from f27bc04 to 43c5e05 Compare November 6, 2023 18:47
@sandrina-p sandrina-p changed the title Add oneOf pattern validation fix(select/radio): Add support to oneOf[].pattern validation Nov 6, 2023
@sandrina-p sandrina-p changed the title fix(select/radio): Add support to oneOf[].pattern validation fix(select/radio): Add support to oneOf pattern validation Nov 6, 2023
@sandrina-p sandrina-p changed the title fix(select/radio): Add support to oneOf pattern validation fix(select/radio): Support oneOf[].pattern validation Nov 6, 2023
Copy link
Collaborator

@sandrina-p sandrina-p left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved! I've tweaked the PR title to follow conventional commits. Releasing a new patch version in a minute.

@sandrina-p sandrina-p merged commit 5a4bb59 into remoteoss:main Nov 6, 2023
3 checks passed
@sandrina-p
Copy link
Collaborator

@remoteoss/json-schema-form@0.7.2-beta.0 released 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants