Adds record-level validation to schema definition.