class ActiveLdap::Schema::Syntaxes::NameAndOptionalUID

def validate_normalized_value(value, original_value)

def validate_normalized_value(value, original_value)
  separator_index = value.rindex("#")
  if separator_index
    dn = value[0, separator_index]
    bit_string = value[(separator_index + 1)..-1]
    bit_string_reason = BitString.new.validate(bit_string)
    dn_reason = DistinguishedName.new.validate(dn)
    if bit_string_reason
      if dn_reason
        value_reason = DistinguishedName.new.validate(value)
        return nil unless value_reason
        dn_reason
      else
        bit_string_reason
      end
    else
      dn_reason
    end
  else
    DistinguishedName.new.validate(value)
  end
end