Closed mariusvandam closed 2 weeks ago
Hieronder de conversie en validatie regels en patterns welke in e-Suite worden gehanteerd
/**
* Gebaseerd op RFC 5322 (zie ook http://en.wikipedia.org/wiki/Email_address)
* <p>
* We ondersteunen niet alles (een quoted local part bijvoorbeeld niet).
* Er wordt ook niet gecontroleerd op de top level domain-naam bestaat en of de domain-naam een MX-record heeft.
*/
private static final String ID = "A-Za-z\\d";
private static final String LCL = "[" + ID + "!#$%&\'*+\\-/=?^_`{|}~]+";
private static final String LBL = "[" + ID + "]([" + ID + "\\-]*[" + ID + "])?";
private static final String ADDRESS = LCL + "(\\." + LCL + ")*@" + LBL + "(\\." + LBL + ")+";
public static final String EMAIL = "^" + ADDRESS + "$";
public static final Pattern EMAIL_PATTERN = Pattern.compile(EMAIL);
At the risk of asking for the obvious: is there documentation of the exact validation, other then in andyverberne's comment? Is this something that one would find in a redoc?
Thema / Theme
Klantinteracties API
Omschrijving / Description
It is desirable to have OpenKlant validate any email addresses before storing them so that they are stored in a consistent way.
Toegevoegde waarde / Added value
This make sure only valid mail addresses are stored and any connected system can rely on the provided addresses.
Aanvullende opmerkingen / Additional context
As discussed on 29-8 with Andy, ICATT & Maykin