class urn_perun_user_attribute_def_def_elixirScopedAffiliation extends UserAttributesModuleAbstract implements UserAttributesModuleImplApi {

	@Override
	public void checkAttributeSyntax(PerunSessionImpl perunSession, User user, Attribute attribute) throws WrongAttributeValueException {

		List<String> values = attribute.valueAsList();
		if (values != null && !values.isEmpty()) {
			for (String value : values) {
				// check each value
				Matcher matcher = pattern.matcher(value);
				if(!matcher.matches()) throw new WrongAttributeValueException(attribute, "Wrong format. List of \"(member|affiliate|faculty)@scope\" expected.");
			}
		}

	}

}