HTML::...::Email(3pm)

πŸ“¦
version 0.40068 Β· 6 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute

πŸ’Œ NAME

okay so bestie, this is HTML::FormHandler::Field::Email β€” it validates email using Email::Valid. that's the whole vibe. it's the field that checks your email actually looks like an email πŸ’…

(this is from the HTML::...::Email(3pm) page, user-contributed Perl docs, iykyk 🫢)


✨ VERSION ✨

version 0.40068 β€” that's the one, that's the version, no cap πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

so what does it actually do? it validates that the input looks like an email address, using Email::Valid. icon behavior honestly.

the widget type is 'text'. periodt.

but wait β€” plot twist 🫣 if the form has the 'is_html5' flag active, it will render <input type="email" ... /> instead of type="text". glow up fr fr.

this field also has an 'email_valid_params' attribute ✨ and that attribute accepts a hash reference of extra values. those extra values get passed to "address" in Email::Valid when it's validating email addresses. like it's handing Email::Valid a little snack pack of extra config, we love to see it πŸ“

and if you want to preserve the case of the email address (so Bestie@Example.com stays Bestie@Example.com and doesn't get lowercased on you 😭), just set the 'preserve_case' attribute. that's it. that's the whole trick πŸ”₯


🧚 DEPENDENCIES 🧚

  • Email::Valid β€” the main character of this whole operation πŸ‘‘

🌸 AUTHOR 🌸

FormHandler Contributors β€” see HTML::FormHandler for the full squad 🫢


This software is copyright (c) 2017 by Gerda Shank. πŸ’–

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. slay, literally free software.


and that's the page!! 🌈 brought to you by perl v5.34.0, dated 2022-03-25 β€” mwah, go forth and validate those emails bestie πŸ’œβœ¨
πŸ“¦ where this page comes from