Hello,
as the out of the box validation of an email form field is only checking if an '@' is in the String, i needed to code a custom validation.
here is the working validation:
<script language="javascript" type="text/javascript">
MsCrmMkt.MsCrmFormLoader.on('formSubmit', function (event) {
var emailfield = document.getElementById('guid').value;
var email = /^[a-zA-Z0-9_.-]+@[a-zA-Z0-9_.-]+\.[a-zA-Z]{2,}$/ ;
if(email.test(emailfield) == false ){
// display error message
event.preventDefault();
};
}
);
</script>
Now i want to access and show the user the error when entering an email that does not match the regular expression, the same way it its displayed out of the box.

Is it possible to access it through the form loader? The requirements state to not use an alert as it is bad practice.
Thank you in advance.
Greetings Jakob