Prior to importing data, you can validate an import file using Directory Server's validate-ldif tool.
The tool binds to the Directory Server locally or remotely and validates the LDIF file to determine whether it violates the server's schema. Elements that do not conform to the schema are rejected and written to standard output. You can specify the output filepath to which the rejected entries and reasons for their rejection are written. The validate-ldif tool works with regular non-compressed LDIF files or gzip-compressed LDIF files.