I want to show validation message like enter valid email address. What condition or expression I need to add on input of email. Remember my data type for email attribute in entity is text.
Hi,
Use the Outsystems "EmailAddressValidate()" function to validate the email.
Is that function code visible so I can watch that.
Other way is you can try regular expression:
https://stackoverflow.com/questions/46155/how-to-validate-an-email-address-in-javascript
Hi Yogesh Javir,
I create a example, look in .OML attachment.
Hope this helps.
Regards.
I'm glad I could help!
The following JavaScript shows how to validate email address using Regular Expression .
function validateEmail(inText){
const re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
var email=document.getElementById(inText).value;
if(re.test(String(email).toLowerCase()))
{
alert("Email is valid : " + email);
}
else
alert("Email is not valid : " + email);
For some reason Outsystems thinks abc@abc is a valid email address.
I've been having an issue that the emailaddressvalidate function does not accept, or recognise an apostrophe in the user's e-mail address, e.g. jimo'brien@hotmail.com. Is there a work around for this?