class urn_perun_user_attribute_def_def_vsupMail extends UserAttributesModuleAbstract implements UserAttributesModuleImplApi {

	@Override
	public void checkAttributeSyntax(PerunSessionImpl sess, User user, Attribute attribute) throws WrongAttributeValueException {
		if (attribute.getValue() != null) {
			Matcher emailMatcher = emailPattern.matcher(attribute.valueAsString());
			if (!emailMatcher.find())
				throw new WrongAttributeValueException(attribute, user, "School mail is not in a correct form: \"login@vsup.cz\".");
		}
	}

}