105
Views
5
Comments
How can I accept any special character in email address while Login?
Question
Application Type
Reactive

Hi All,

I'm working on a reactive application login form where I'm trying to enter email like "prince.kumar+1@mail.com" but I'm unable to Login with this email as it is showing Invalid email and password.

you can see into the below image. 

as I'm trying to replace this (+) symbol with this code. But still, it's not working for me.

Username = prince.kumar+1@mail.com

Please suggest me any advice. Any help will be appreciable.

Thanks 

Prince

2018-10-29 08-31-03
João Marques
 
MVP

Hi Prince,


You should use the built-in function EncodeURL to make sure that your email can be correctly encoded and passed in the URL of the web service, like on the example below: 


Kind Regards,
João

2024-06-24 04-49-49
Princi

Hi Marques,

Thanks for the reply. I have tried this but my in my parameter my email is passing with the special character (+). You can see into the image below.

Is there any other way to get this email without special character?

One thing I need to add in this. In my database the email is saved in this (prince.kumar+1@mail.com) way and here it is passing in a same format with (+ sign). 

This is a valid email but I'm not able to login with this. I thing because of this (+ sign) Hope you understand my problem.

2018-10-29 08-31-03
João Marques
 
MVP

Hi Prince,


When you save on your database, you should save it as is: prince.kumar+1@mail.com.

When you are consuming the web service, the parameters, if passed on URL, need to be encoded. This means that as the web service input username for your case should be the URL-encoded.

When running the EncodeURL function, the + symbol becomes %2B and the @ becomes %40.

I made a quick sandbox with the EncodeURL function on your example, and this is what I get:

   

Kind Regards,
João

2021-09-21 09-26-31
Aadhavan Shanmugam

Hi @Prince K ,

Try to share the variable or input data type to text instead of email. 

Kindly share the oml to validate further

Thanks, Aadhavan S

2024-06-24 04-49-49
Princi

Hi Aadhavan,

Thanks for your reply. I have already tried this method but it is not working. 

Actually, this data I'm passing through the API so for that I had to change the BODY as HEADER for that variable and it works for me.

Thanks 

Prince

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.