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

Error message is fixed "This field is required" in form builder #11274

Open
tajmirul-strativ opened this issue Feb 19, 2025 · 0 comments · May be fixed by #11275
Open

Error message is fixed "This field is required" in form builder #11274

tajmirul-strativ opened this issue Feb 19, 2025 · 0 comments · May be fixed by #11275
Labels
area: templates Templates directory status: needs-triage Possible bug which hasn't been reproduced yet

Comments

@tajmirul-strativ
Copy link

Describe the Bug.

I've created a custom phone number input block for my form builder, including validation. However, the component on the frontend only displays the generic message "This field is required," even when formState.errors contains specific error messages. This is not the expected behavior. I need the component to display the error messages from formState.errors.

Reproduction Steps

add a custom field in form builder and try to add some validation.

Environment Info

Binaries:
  Node: 18.20.6
  npm: N/A
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  payload: 3.22.0
  next: 15.1.5
  @payloadcms/db-mongodb: 3.22.0
  @payloadcms/email-nodemailer: 3.22.0
  @payloadcms/graphql: 3.22.0
  @payloadcms/live-preview: 3.22.0
  @payloadcms/live-preview-react: 3.22.0
  @payloadcms/next/utilities: 3.22.0
  @payloadcms/payload-cloud: 3.22.0
  @payloadcms/plugin-cloud-storage: 3.22.0
  @payloadcms/plugin-form-builder: 3.22.0
  @payloadcms/plugin-nested-docs: 3.22.0
  @payloadcms/plugin-redirects: 3.22.0
  @payloadcms/plugin-search: 3.22.0
  @payloadcms/plugin-seo: 3.22.0
  @payloadcms/richtext-lexical: 3.22.0
  @payloadcms/storage-s3: 3.22.0
  @payloadcms/translations: 3.22.0
  @payloadcms/ui/shared: 3.22.0
  react: 19.0.0
  react-dom: 19.0.0
Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 10 Home Single Language
  Available memory (MB): 16070
  Available CPU cores: 12
@tajmirul-strativ tajmirul-strativ added area: ui Related to the admin panel. status: needs-triage Possible bug which hasn't been reproduced yet labels Feb 19, 2025
@paulpopus paulpopus added area: templates Templates directory and removed area: ui Related to the admin panel. labels Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: templates Templates directory status: needs-triage Possible bug which hasn't been reproduced yet
Projects
None yet
2 participants