Jump to content

Check Email Syntax


This topic is 6887 days old. Please don't post here. Open a new topic instead.

Recommended Posts

By a Calculation, Show if any unwanted Type in the email field

This is what the Field Does now:

Case(

Realtors::eMail to Send < 1; TextColor ( "Bad Syntax: empty" ; RGB ( 255 ; 0 ; 0 ) );

PatternCount(Realtors::eMail to Send ; "," ); TextColor ( "Bad Syntax: [ , ] found" ; RGB ( 255 ; 0 ; 0 ) );

PatternCount(Realtors::eMail to Send ; "$" ); TextColor ( "Bad Syntax: [ $ ] found" ; RGB ( 255 ; 0 ; 0 ) );

PatternCount(Realtors::eMail to Send ; "%" ); TextColor ( "Bad Syntax: [ % ] found" ; RGB ( 255 ; 0 ; 0 ) );

PatternCount(Realtors::eMail to Send ; "^" ); TextColor ( "Bad Syntax: [ ^ ] found" ; RGB ( 255 ; 0 ; 0 ) );

PatternCount(Realtors::eMail to Send ; "&" ); TextColor ( "Bad Syntax: [ & ] found" ; RGB ( 255 ; 0 ; 0 ) );

PatternCount(Realtors::eMail to Send ; "*" ); TextColor ( "Bad Syntax: [ * ] found" ; RGB ( 255 ; 0 ; 0 ) );

PatternCount(Realtors::eMail to Send ; "(" ); TextColor ( "Bad Syntax: [ ( ] found" ; RGB ( 255 ; 0 ; 0 ) );

PatternCount(Realtors::eMail to Send ; ")" ); TextColor ( "Bad Syntax: [ ) ] found" ; RGB ( 255 ; 0 ; 0 ) );

PatternCount(Realtors::eMail to Send ; "&" ); TextColor ( "Bad Syntax: [ & ] found" ; RGB ( 255 ; 0 ; 0 ) );

PatternCount(Realtors::eMail to Send ; "+" ); TextColor ( "Bad Syntax: [ + ] found" ; RGB ( 255 ; 0 ; 0 ) );

PatternCount(Realtors::eMail to Send ; ":" ); TextColor ( "Bad Syntax: [ : ] found" ; RGB ( 255 ; 0 ; 0 ) );

PatternCount(Realtors::eMail to Send ; "@" ) > 1; TextColor ( "Bad Syntax: 2 [ @ ] found" ; RGB ( 255 ; 0 ; 0 ) );

PatternCount(Realtors::eMail to Send ; "@" ) < 1; TextColor ( "Bad Syntax: No [ @ ] found" ; RGB ( 255 ; 0 ; 0 ) );

PatternCount(Realtors::eMail to Send ; " " ); TextColor ( "Bad Syntax: [ Space ] found" ; RGB ( 255 ; 0 ; 0 ) );

PatternCount(Realtors::eMail to Send ; "/" ); TextColor ( "Bad Syntax: [ / ] found" ; RGB ( 255 ; 0 ; 0 ) );

PatternCount(Realtors::eMail to Send ; "!" ); TextColor ( "Bad Syntax: [ ! ] found" ; RGB ( 255 ; 0 ; 0 ) );

PatternCount(Realtors::eMail to Send ; "=" ); TextColor ( "Bad Syntax: [ = ] found" ; RGB ( 255 ; 0 ; 0 ) );

PatternCount(Realtors::eMail to Send ; "[" ); TextColor ( "Bad Syntax: [ [ ] found" ; RGB ( 255 ; 0 ; 0 ) );

PatternCount(Realtors::eMail to Send ; "]" ); TextColor ( "Bad Syntax: [ ] ] found" ; RGB ( 255 ; 0 ; 0 ) );

PatternCount(Realtors::eMail to Send ; ";" ); TextColor ( "Bad Syntax: [ ; ] found" ; RGB ( 255 ; 0 ; 0 ) );

PatternCount(Realtors::eMail to Send ; "<" ); TextColor ( "Bad Syntax: [ < ] found" ; RGB ( 255 ; 0 ; 0 ) );

PatternCount(Realtors::eMail to Send ; ">" ); TextColor ( "Bad Syntax: [ > ] found" ; RGB ( 255 ; 0 ; 0 ) );

Realtors::eMail to Send > 1; TextColor ( "Syntax OK" ; RGB ( 0 ; 255 ; 0 ) );

)

Link to comment
Share on other sites

Hi,

try this:

Let([

@ = PatternCount ( eMail To Send ; "@" );

BadChars = Filter ( ",$%^&*()+: /!=[];<>" ; eMail To Send )

]; 

Case

(

eMail To Send = "";"";

@ < 1;TextColor ( "Bad Syntax: No [ @ ] found" ; RGB ( 255 ; 0 ; 0 ) );

@ > 1;TextColor ( "Bad Syntax: More than 1 [ @ ] found" ; RGB ( 255 ; 0 ; 0 ) );

Length ( BadChars );TextColor ( "Bad Syntax: [ " & BadChars & " ] found" ; RGB ( 255 ; 0 ; 0 ) );

TextColor ( "Syntax OK" ; RGB ( 0 ; 255 ; 0 ))

)

) 

Link to comment
Share on other sites

This topic is 6887 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.