class urn_perun_user_attribute_def_def_rootMailAliasesMail extends UserAttributesModuleAbstract implements UserAttributesModuleImplApi {

    @Override
    public void checkAttributeSyntax(PerunSessionImpl sess, User user, Attribute attribute) throws WrongAttributeValueException {
        String attributeValue = attribute.valueAsString();

        Matcher emailMatcher = Utils.emailPattern.matcher(attributeValue);
        if (!emailMatcher.find()) {
            throw new WrongAttributeValueException(attribute, user, "Email is not in correct form.");
        }
    }

}