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

Phone number validation doesn't show when empty #2278

Open
cookie10codes opened this issue Feb 4, 2025 · 2 comments
Open

Phone number validation doesn't show when empty #2278

cookie10codes opened this issue Feb 4, 2025 · 2 comments

Comments

@cookie10codes
Copy link

Describe the bug

When a Phone Number isn't filled in, the validation isn't being shown on the form itself.

I think it has to do with the double naming in the fields name="fields[phone][number]". All the other fields just have for example name="fields[email]"

Image

Steps to reproduce

  1. Add a Phone Number field
  2. Send a form without filling in the field

Form settings

  • Multi-page form: Yes and No
  • Submission Method: Ajax and Page Reload
  • Client-side Validation: No
  • Custom Form Templates: Yes

Craft CMS version

Craft Pro 5.6.4

Plugin version

3.0.20

Multi-site?

no

Additional context

No response

@engram-design
Copy link
Member

Seems to be working for me.

Image

Note that this is with the Country option disabled (so just a standalone number field), and with client-side JS validation disabled. The above shows the server-side error when submitting the form.

@engram-design
Copy link
Member

Ah, so that's only for Ajax-based forms it seems.

Fixed for the next release. To get this early, run composer require verbb/formie:"dev-craft-5 as 3.0.20".

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

No branches or pull requests

2 participants