Top Description Constructors Methods
org.hibernate.validator.internal.constraintvalidators.bv

public Class AssertTrueValidator

extends Object
implements ConstraintValidator<AssertTrue, Boolean>
Class Inheritance
All Implemented Interfaces
jakarta.validation.ConstraintValidator
Imports
jakarta.validation.ConstraintValidator, .ConstraintValidatorContext, jakarta.validation.constraints.AssertTrue

Validates that the value passed is true
Author
Alaa Nassef

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
isValid(Boolean
object to validate
bool
,
ConstraintValidatorContext
context in which the constraint is evaluated
constraintValidatorContext
)

Implements jakarta.validation.ConstraintValidator.isValid.

Implements the validation logic.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

AssertTrueValidatorback to summary
public AssertTrueValidator()

Method Detail

isValidback to summary
public boolean isValid(Boolean bool, ConstraintValidatorContext constraintValidatorContext)

Implements jakarta.validation.ConstraintValidator.isValid.

Doc from jakarta.validation.ConstraintValidator.isValid.

Implements the validation logic. The state of value must not be altered.

This method can be accessed concurrently, thread-safety must be ensured by the implementation.

Parameters
bool:Boolean

object to validate

constraintValidatorContext:ConstraintValidatorContext

context in which the constraint is evaluated

Returns:boolean

false if value does not pass the constraint

Annotations
@Override