Search code examples
validationdynamics-crmdynamics-crm-2016email-addressdynamics-365

Where is definition of validation applied to Email form Single Line of Text fields in Dynamics 365?


I understand that if I create a field against an Entity in Dynamics 365 (we're running 1612 8.2.2.112 on-prem), I can select a Data Type of Single Line of Text and a Format of Email, which will cause any values entered into that field to be formatted as clickable mailto: links, as well as providing some validation of the values entered to ensure they are email addresses.

However, I've been unable to find any documentation (from Microsoft or otherwise) which defines exactly the validation which is carried out on fields like this. From casual testing it seems that the only requirement is for the value to contain the @ character and also not contain a few special characters.

There seems to be no requirement to have a . in the portion after the @, so values like john@domain pass this validation, where my understanding is they should not.

So, can anyone point me to the documentation which confirms the validation being applied here and also, does anyone have any suggestions as to how better validation of these values should be implemented (I'm assuming some JavaScript could do the job, but something OOTB would be nice if possible).


Solution

  • The only relevant documentation I've found doesn't answer your question.

    Your description of the format behaviour matches my experience. I suspect it is following the RFC standards as described on Wikipedia. You could confirm this via testing. Note; john@domain is a valid (but unusual) email address.

    If you wanted to change the behaviour I would suggest; adding on change JavaScript that validates the user input against a Regex. If the input is invalid then present an error and clears the user value.