class urn_perun_user_attribute_def_def_login_namespace_ceitec extends urn_perun_user_attribute_def_def_login_namespace {

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

		// check syntax of attribute
		super.checkAttributeSyntax(sess, user, attribute);

		// plus check, that login is max 20 chars.
		if (attribute.getValue() != null) {
			if ((attribute.valueAsString()).length() > 20) throw new WrongAttributeValueException(attribute, user, "Login '" + attribute.getValue() + "' exceeds 20 chars limit.");
		}

	}

}