class urn_perun_member_attribute_def_def_mail extends MemberAttributesModuleAbstract implements MemberAttributesModuleImplApi {

	@Override
	public void checkAttributeSyntax(PerunSessionImpl perunSession, Member member, Attribute attribute) throws WrongAttributeValueException {
		if (attribute.getValue() == null) return;

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

}