These extensions are not applied by default, but it is strongly recommended you do apply them in your project.
SilverStripe\ORM\DataObject:
extensions:
- Signify\ComposableValidators\Extensions\DataObjectDefaultAjaxExtension
Replaces the default CompositeValidator
that all DataObject
s have (see DataObject::getCMSCompositeValidator()
) with this module's AjaxCompositeValidator
.
Unfortunately at the time of writing these docs, the CompositeValidator
is instantiated using the new
keyword instead of using the create()
method, so you can't just replace it outright in the Injector
- but even if you could, we'd strongly recommend including a SimpleFieldsValidator
, which would be tricky if possible at all to do via the Injector
.
This extension also automatically adds a SimpleFieldsValidator
to ensure all form fields have valid data.
SilverStripe\ORM\DataObject:
extensions:
- Signify\ComposableValidators\Extensions\DataObjectValidationExemptionExtension
SilverStripe\Forms\GridField\GridFieldDetailForm_ItemRequest:
extensions:
- Signify\ComposableValidators\Extensions\GridFieldItemRequestValidationExemptionExtension
For whatever reason, the "delete", "archive", and "restore" actions in Silverstripe are not validation exempt actions. This can cause issues with the AjaxCompositeValidator
which won't let you perform those actions if the data doesn't pass validation.
These extensions are necessary if you're using the AjaxCompositeValidator
, but aren't applied by default in case they cause issues in some projects.
SilverStripe\Forms\GridField\GridField:
extensions:
- Signify\ComposableValidators\Extensions\GridFieldMessagesExtension
Ensures validation messages display for a GridField
. GridField
s didn't display validation messages prior to 4.10.0.
These extensions are already applied by default. They shouldn't interfere with any project or vendor code, and are necessary for certain features to function correctly.
Provides the action used for AJAX validation via the AjaxCompositeValidator
.
Provides the setOmitFieldValidation()
and getOmitFieldValidation()
methods to determine if fields should be validated by the SimpleFieldsValidator
.