X-Git-Url: https://git.hcoop.net/hcoop/domtool2.git/blobdiff_plain/f208fe7eb343486d3a464e0813d1cdce19b1ac5f..c9731b9b3ee43c4c8d82c31009a5870a01d3acfa:/src/domain.sml diff --git a/src/domain.sml b/src/domain.sml index 3d8290b..4e38a98 100644 --- a/src/domain.sml +++ b/src/domain.sml @@ -102,6 +102,14 @@ val yourDomain = yourDomainHost fun validUser s = size s > 0 andalso size s < 20 andalso CharVector.all Char.isAlphaNum s +fun validEmailUser s = + size s > 0 andalso size s < 50 + andalso CharVector.all (fn ch => Char.isAlphaNum ch + orelse ch = #"." + orelse ch = #"_" + orelse ch = #"-" + orelse ch = #"+") s + val validGroup = validUser val _ = Env.type_one "no_spaces"