Validates the entity against the definition.
public validate ( |
||
$data | the data access instance used for counting things | |
$expectedVersion | integer | the version to perform the optimistic locking check on |
return | array | an array with the fields "valid" and "errors"; valid provides a quick check whether the given entity passes the validation and errors is an array with all errored fields as keys and arrays as values; this field arrays contains the actual errors on the field: "boolean", "floating", "integer", "dateTime" (for dates and datetime fields), "inSet", "reference", "required", "unique", "value" (only for the version field, set if the optimistic locking failed). |