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 bcdf137
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 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 @@ -22,6 +23,15 @@
*/
class UserFormsRequiredFields extends RequiredFields
{
/**
* @deprecated 5.4.0 Will be renamed to SilverStripe\UserForms\Form\\UserFormsRequiredFieldsValidator
*/
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 bcdf137

Please sign in to comment.