# class ActiveLdap::Schema::Syntaxes::NameAndOptionalUID

### Private Instance Methods

validate_normalized_value(value, original_value) click to toggle source

    # File lib/active_ldap/schema/syntaxes.rb, line 299
    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