cancel
Showing results for 
Search instead for 
Did you mean: 

Email Validation

Former Member
0 Kudos

Hi All,

I working on validation of email field ,Suppose somebody enters email ID like this .

abc#@#xyz.com.

abc@#xyz.com I need to check for these # and throw an error .Could you please let me know on this.

Thanks,

Madhu

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Madhu

Use "Find" function

FIND(field name, "#") - return symbol position in string(field name)

Regards

Kanstantsin Chernichenka

Former Member
0 Kudos

Hi Kanstantsin Chernichenka,

Yeah that is fine but i need to check # symbol exists before @ symbol like #@ and @#,any of these case ,i need to error out.

I mean to say is # exists before at symbol and after at symbol .

Please let me know how can i validate . It like fat finger error .I sould not allow # symbol before or after @ symbol.

Thanks,

Madhu

Former Member
0 Kudos

Hi,

MID(FIELD NAME,FIND(FIELD NAME, "@")-1,1) Not Equal Operator "#" AND

MID(FIELD NAME,FIND(FIELD NAME, "@")+1,1) Not Equal Operator "#"

This will validate # should not come before and after @ symbol.

Select the Not Equal Operator from Operators Drop-down.

I tried it at my end, it is working fine.

Thanks and Regards,

Mandeep Saini

Former Member
0 Kudos

Sorry..

former_member205403
Active Contributor
0 Kudos

Hi,

Try this validation Expression

IF(ABS( ( ( FIND(XXXX, "@" ) ) - ( FIND ( XXXX, "#" ) ) ) ) Not Equal Operator "1", TRUE, FALSE)

Here, replace word "Not Equal operator" with the actual not equals operator by selecting from the operators list. I don;t know how to make it displayed in the post.

"XXXX" means you field where you want to put validation on. This will solve your requirement that # should not come just before or just after @ character. II tried it in my system. Check it and revert with the result.

Logic is pretty Simple. We are finding position of @ and # character in the XXXX field and if the difference in the position is not equal to "1", it means they are not together. In other case when it is equal to 1 error it out..

I am not fully aware of your business requirement, but feel you should put some more validations on this field like

1. @ or # should not be allowed more than once in the field.

2. Any special character other than permitted characters should not be allowed to enter in this field.

3. # or any special character (except ".") should not come after @.

etc...

Note:// Make sure Automatic execution property of this validation is set to Error, for capture error while saving a new record.

Best Regards,

Shiv

Edited by: Shiv Prashant Dixit on Feb 25, 2010 10:51 PM

Edited by: Shiv Prashant Dixit on Feb 26, 2010 12:40 AM

Former Member
0 Kudos

Shiv,

That conditon worked well for me ,but in ceratin condition when user copies and paste the email id in Portal that comes into MDM and MDM syndicates out to ECC but in ECC Idoc getting errored out with now we are having Idoc getting errored out with &#8217 and &#8216,when send data from mdm to ECC .

Could you help me out how we can validate these hexdecimal values.

Thanks,

Madhu

former_member205403
Active Contributor
0 Kudos

Hi,

I would suggest to take help of some abap expert to debug and find out for what values it is getting errored out in ECC. then we can try to put validation in MDM accordingly to prevent those values from being entered.

-


I found that u2019 means left single quotation mark ( ' ) and u2018 means Right single Quotation Mark ( ' ). In the syndicator try by doing following changes in your map:

Go to "destination Items" Tab and select your destination Item which is giving you problem. Set Normalization property for this destination Item as "Custom Normalization Only" and specify Quotation Mark ( ' ) (without * as the custom character for normalization). Try it and I think it will resolve your problem. kindly revert with the result.

Regards,

Shiv

Edited by: Shiv Prashant Dixit on Feb 27, 2010 3:53 AM

Former Member
0 Kudos

Shiv,

If I want to count the number of '#' in email Id .Can we acheive with Count Function..My field is not multivalued .If so Could you please let mek now on this .

Thanks,

Madhu

former_member205403
Active Contributor
0 Kudos

Hi,

I don't think you can acheive this with Count function as it just count total number of records. Let me check on this

Former Member
0 Kudos

Shiv,

I got one more ,If I find more than one @ symbol i need to error the Record .

Could Please let me know on this.

Thanks,

Madhu

former_member205403
Active Contributor
0 Kudos

Hi,

I could thought of this logic to throw error if there are more than 1 @ symbol in the Field.

IF(FIND(xxxx,"@",FIND(xxxx,"@")+1)=0,TRUE,FALSE)

Here, XXXX means your email ID field.

Logic is pretty Simple, we are checking for next occurrence of @ starting from first occurrence of @. if there is more than 1 @ then this outer Find will return some non zero number otherwise zero.

Regards,

Shiv

-


-


In my previous post in this thread

&#8217 and &#8216

has been replaced by quotation Mark ( ' ). this is making previous post confusing and misleading. So I am re-posting to make things clear :

"I found that

&#8217 

means left single quotation mark ( ' ) and

&#8216

means Right single Quotation Mark ( ' ). In the syndicator try by doing following changes in your map:

Go to "destination Items" Tab and select your destination Item which is giving you problem. Set Normalization property for this destination Item as "Custom Normalization Only" and specify Quotation Mark ( ' ) (without bracket as the custom character for normalization). Try it and revert with the result."

Regards,

Shiv

Former Member
0 Kudos

Shiv,

Sorry it worked now.

Thanks,

Madhu

Edited by: Madhusudhan Honnappa on Mar 3, 2010 8:18 PM

Answers (0)