ezsystems/ezpublish-kernel — pull request #418 by pspanja (2013-06-17 18:02:46+00:00)
Title: Fix EZP-20867: apply default validator configuration

This PR resolves issue https://jira.ez.no/browse/EZP-20867

`applyDefaultValidatorConfiguration()` is added to the SPI interface and Core implementation. Both this method and `applyDefaultFieldSettings()` now throw `InvalidArgumentException`.

`validateValidatorConfiguration()` and `validateFieldSettings()` are somewhat simplified (as `applyDefault*` is expected to be called before); casting to array and type validation are removed.

Also fixed:

* `validate()` method is now explicit about empty field value being always valid
* Selection field type: empty array of options is stored as null, which could not be restored from DB
* Relation field type: empty `selectionRoot` can now be stored
* RelationList field type: empty `selectionDefaultLocation` can now be stored