Skip to content

Optional field validation doesn't work as expected #3794

@maxkoshel

Description

@maxkoshel

Describe the bug

An empty optional field after focus becomes required.

Also translations haven't found for:

  • Enter a valid phone number
  • This checkbox must be selected

Reproduction Steps

When you fill form and have an optional phone number field and do not touch this field, you will not get any validation errors. However, if you focus on the field and then leave it without any changes (it's empty, no spaces typed), you will not get validation errors, but you will get them after click on the "Register" button.

SDK Versions

System:
OS: macOS 12.2
CPU: (8) arm64 Apple M1 Pro
Memory: 102.75 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 18.16.0 - ~/.nvm/versions/node/v18.16.0/bin/node
Yarn: 1.22.19 - ~/.nvm/versions/node/v18.16.0/bin/yarn
npm: 9.5.1 - ~/.nvm/versions/node/v18.16.0/bin/npm
Browsers:
Brave Browser: 129.1.70.117
Chrome: 133.0.6943.127
Safari: 15.3
npmPackages:
@okta/okta-auth-js: ^7.10.1 => 7.10.1
@okta/okta-signin-widget: ^7.28.1 => 7.28.1

Additional Information

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions