Skip to content

Email Input Field Type is Set to "text" Instead of "email" #182

@ayzerobug

Description

@ayzerobug

While inspecting the rendered HTML of my document, I noticed that the field intended for email input has its type attribute set to "text" instead of "email". This is problematic because it prevents browsers from enabling built-in email validation and other related features (e.g., showing the email-specific keyboard on mobile devices).

Additionally, after reviewing the package's documentation, I found that there is no option to explicitly set the input type to "email". This limitation makes it difficult to ensure proper input validation and an optimal user experience.

Expected Behavior:

The package should allow developers to specify the inputType (or an equivalent option) so that fields requiring email input can be properly configured with type="email".

Steps to Reproduce:

  1. Render a form that includes an email input field using this package.
  2. Inspect the generated HTML in the browser’s developer tools.
  3. Observe that the type attribute of the input field is set to "text" instead of "email".

Proposed Solution:

  • Introduce a prop or configuration option that allows setting the inputType.
  • Ensure that when type="email" is specified, the field behaves correctly with built-in validation.

Would appreciate any guidance on this, and I’m happy to contribute if needed! 🚀

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions