|
|||||||||||||||||
IsEmail Custom Tag
Description Requires ColdFusion 5 or greater. IsEmail.cfm is a ColdFusion custom tag that validates email address formats according to RFC 3696. Returns boolean value "IsEmail" indicating validation result and a string value "IsEmail_Err" with details if the validation fails. "IsEmail_Err" is empty if validation is successful. Use this as the server-side component for email validation when using the JS Toolbox for client-side validation. Syntax <CF_IsEmail EMAILADDRESS="email address" MODE="full or common"> Attributes
Examples
<CFPARAM NAME="Form.Email" DEFAULT="bugs@acme.com"> <CFPARAM NAME="Form.Mode" DEFAULT=""> <FORM ACTION="CFCTisemail.cfm" METHOD="post" NAME="TheForm"> <INPUT TYPE="text" NAME="Email" VALUE="<CFOUTPUT>#Form.Email#</CFOUTPUT>" SIZE="60"> <INPUT TYPE="checkbox" NAME="Mode" VALUE="Common"<CFIF Form.Mode IS "Common"> CHECKED</CFIF>>Common mode <INPUT TYPE="submit" VALUE="Validate"> </FORM> <CF_IsEmail EmailAddress="#Form.Email#" Mode="#Form.Mode#"> <CFIF IsEmail> <P>Email address format is valid <CFELSE> <P>Email address format is NOT valid <P>Reason: <CFOUTPUT>#IsEmail_Err#</CFOUTPUT> </CFIF> |
|||||||||||||||||
|