Download the PHP package signify-nz/silverstripe-dependentrequiredfields without Composer
On this page you can find all versions of the php package signify-nz/silverstripe-dependentrequiredfields. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download signify-nz/silverstripe-dependentrequiredfields
More information about signify-nz/silverstripe-dependentrequiredfields
Files in signify-nz/silverstripe-dependentrequiredfields
Package silverstripe-dependentrequiredfields
Short Description SilverStripe vendor module providing a validator which allows for fields to be required based on the values of other fields.
License BSD-3-Clause
Homepage https://github.com/signify-nz/silverstripe-dependentrequiredfields
Informations about the package silverstripe-dependentrequiredfields
Dependent Required Fields
The Dependent Required Fields module provides a validator which extends RequiredFields and allows for fields to be required based on the values of other fields.
SearchFilters are used to provide a variety of ways to compare values, depending on what causes the fields to be required. See SilverStripe's documentation on SearchFilters for more about how to use those.
Requirements
Installation
Composer:
Documentaion
No configuration is required. See Example Usage below for an example of how this validator is used.
- Changelog
- Contributing
- Issues
- License
Example Usage
In the below example, we have fields with various levels of dependency on whether they are required or not.
AlwaysRequiredField
will be required regardless of the values of other fields.
ExactValueField
will only be required if the value of DependencyField
exactly equals someExactValue
.
StartsWithField
will only be required if the value of DependencyField
starts with the string some
.
Additional methods are also provided to add or remove dependently required fields. Note that the field AlwaysRequiredField
from the above example cannot be added or removed using these methods; the addRequiredField
and removeRequiredField
fields provided by RequiredField should be used instead.
All versions of silverstripe-dependentrequiredfields with dependencies
silverstripe/vendor-plugin Version ^1.0
athari/yalinqo Version ^2.4