Skip to content

Commit

Permalink
API Deprecate renamed validator
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Dec 3, 2024
1 parent a05725a commit 3be85ec
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions code/Form/UserFormsRequiredFields.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use SilverStripe\Forms\RequiredFields;
use SilverStripe\ORM\ArrayLib;
use SilverStripe\UserForms\Model\EditableFormField;
use SilverStripe\Dev\Deprecation;

/**
* An extension of RequiredFields which handles conditionally required fields.
Expand All @@ -19,9 +20,17 @@
*
* Required fields will be validated as usual.
* Conditionally required fields will be validated IF the display rules are satisfied in the submitted dataset.
*
* @deprecated 5.4.0 Will be renamed to SilverStripe\UserForms\Form\\UserFormsRequiredFieldsValidator
*/
class UserFormsRequiredFields extends RequiredFields
{
public function __construct()
{
Deprecation::noticeWithNoReplacment('5.4.0', 'Will be renamed to SilverStripe\\UserForms\\Form\\\UserFormsRequiredFieldsValidator', Deprecation::SCOPE_CLASS);
parent::__construct(...func_get_args());
}

/**
* Allows validation of fields via specification of a php function for
* validation which is executed after the form is submitted.
Expand Down

0 comments on commit 3be85ec

Please sign in to comment.