Skip to content

Latest commit

 

History

History
39 lines (27 loc) · 1.12 KB

File metadata and controls

39 lines (27 loc) · 1.12 KB

Validator Constraint Reference :id=top

Learn how to integrate the Validator into the system. See the Validator Integration for more details.

RecaptchaChallenge

Part of the package: sunrise/recaptcha

Validates the user's response token.

use Sunrise\Recaptcha\Integration\Validator\Constraint\RecaptchaChallenge;

final readonly class SomeDto
{
    public function __construct(
        #[RecaptchaChallenge]
        private $recaptcha,
    ) {
    }
}

UniqueEntity

Part of the package: sunrise-studio/doctrine-bridge

Ensures entity uniqueness based on specified fields.

If you need to assign an entity manager name different from the default, you can do this via the em parameter of this annotation.

use Sunrise\Bridge\Doctrine\Integration\Validator\Constraint\UniqueEntity;

#[UniqueEntity(fields: ['slug'])]
class Page
{
}