How to validate a field as an email if it contains the "@" character
See original GitHub issueHey,
Is it possible to conditionally validate a field based on its own content? I know it’s possible to do conditional validation based on another input using .when()
, but couldn’t find anything using the field content itself.
Thank you in advance for your response
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
4.1. Validate Email Addresses - Regular Expressions ...
This first solution does a very simple check. It only validates that the string contains an at sign (@) that is preceded and...
Read more >JavaScript: HTML Form - email validation - w3resource
In this page we have discussed how to validate an email using JavaScript : An email is a string (a subset of ASCII...
Read more >How can you check if an input (email) field contains a special ...
1. All you need is $("input[name='emailAddress']").val(); before checking with the regex. – Pointy · @Pointy Do you have an example? – Spanky.
Read more >How to Do an Email Validation in JavaScript? - Simplilearn
One of the most popular ways of validating email in JavaScript is by using regular expressions. JavaScript uses regular expressions to describe ...
Read more >How to verify that strings are in valid email format
The example defines an IsValidEmail method, which returns true if the string contains a valid email address and false if it doesn't but...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yep, this worked
Thanks a lot @jquense !
Try
'.'
for the field name