Last active
August 29, 2015 13:57
-
-
Save gchriswill/9717605 to your computer and use it in GitHub Desktop.
Revisions
-
gchriswill renamed this gist
Sep 8, 2014 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
gchriswill revised this gist
Mar 23, 2014 . 1 changed file with 9 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,17 +1,19 @@ //Save the value of the field into a variable var emailValue = emailField.getValue(); /* This formula or method condition in five easy steps * * 1- First searches for an "@" in the string * 2- Then it checks for more than one "@" * 3- Then checks if the subdomain area is less than 4 characters * 4- Then checks if the position of the last "." is less than 3 spaces after the "@" * 5- Then checks if there are two or less characters after the last "." */ if ( ( emailValue.search("@") == -1 ) || ( emailValue.indexOf("@") !== emailValue.lastIndexOf("@") ) || emailValue.indexOf("@") < 4 || emailValue.lastIndexOf(".") < emailValue.indexOf("@") + 3 || emailValue.lastIndexOf(".") + 2 >= emailValue.length ) { alert("Please enter a valid email"); };
-
gchriswill renamed this gist
Mar 23, 2014 . 1 changed file with 7 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,12 +1,13 @@ //Save the value of the field into a variable var emailValue = emailField.getValue(); /* This formula or method condition first searches for if there is an "@" in the string * Then is searches for if there is more than one "@" symbol * Then checks if the subdomain area is less than 4 characters * Then checks if the last "." is after the "@" and 3 spaces after the "@" * Then checks if there are two or less characters after the last "." */ if ( ( emailValue.search("@") == -1 ) || ( emailValue.indexOf("@") !== emailValue.lastIndexOf("@") ) || emailValue.indexOf("@") < 4 || emailValue.lastIndexOf(".") < emailValue.indexOf("@") + 3 || emailValue.lastIndexOf(".") + 2 >= emailValue.length ) { -
gchriswill renamed this gist
Mar 23, 2014 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,8 @@ var emailValue = emailField.getValue(); //Then is searches for if there is more than one "@" symbol //Then checks if the subdomain area is less than 4 characters //Then checks if the last "." is after the "@" and 3 spaces after the "@" //Then checks if there are two or less characters after the last "." if ( ( emailValue.search("@") == -1 ) || ( emailValue.indexOf("@") !== emailValue.lastIndexOf("@") ) || emailValue.indexOf("@") < 4 || emailValue.lastIndexOf(".") < emailValue.indexOf("@") + 3 || emailValue.lastIndexOf(".") + 2 >= emailValue.length ) { -
gchriswill created this gist
Mar 23, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ //Save the value of the field into a variable var emailValue = emailField.getValue(); //This formula or method condition first searches for if there is an "@" in the string //Then is searches for if there is more than one "@" symbol //Then checks if the subdomain area is less than 4 characters //Then checks if the last "." is after the "@" and 3 spaces after the "@" //Then checks if the if ( ( emailValue.search("@") == -1 ) || ( emailValue.indexOf("@") !== emailValue.lastIndexOf("@") ) || emailValue.indexOf("@") < 4 || emailValue.lastIndexOf(".") < emailValue.indexOf("@") + 3 || emailValue.lastIndexOf(".") + 2 >= emailValue.length ) { alert("Please enter a valid email") };