Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Deprecate renamed validator #1354

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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());
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}

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