Interface TravelValidator
- All Superinterfaces:
org.springframework.validation.Validator
- All Known Implementing Classes:
AbstractTravelValidator,AccommodationSearchRequestValidator,AccommodationSearchRequestValidator,AddBundleToCartTransportOfferingCodesValidator,AddPackageToCartRequestValidator,AddRoomStayValidator,AddRoomStayValidator,CabinValidator,ChangeCurrencyValidator,CountryIsoValidator,DateValidator,DepartureDateValidator,EmailValidator,EnumValueValidator,FieldIntegerValidator,FieldNotEmptyOrWrongLengthValidator,FieldNotEmptyValidator,FieldNumberValidator,FieldRangeValidator,FlightCodesValidator,FlightSearchRequestValidator,LanguageIsoValidator,ListCompositeValidator,ListNotEmptyOrWrongSizeValidator,ListNotEmptyValidator,ListWrongSizeValidator,PackageSearchRequestValidator,PassengerTypeValidator,PaymentDetailsValidator,RegexpValidator,TransportSearchRequestValidator,TravelCompositeValidator
public interface TravelValidator
extends org.springframework.validation.Validator
An extension of
Validator to add support for field validation and skip validation for optional cases.-
Method Summary
Modifier and TypeMethodDescriptionReturn the field path for validation.booleanisValidationRequired(Object target) Checks thatTravelValidatorneeds to be executed for the suppliedtargetobjectvoidValidate the suppliedtargetobjectMethods inherited from interface org.springframework.validation.Validator
supports, validate
-
Method Details
-
getFieldPath
String getFieldPath()Return the field path for validation.- Returns:
- field path
-
isValidationRequired
Checks thatTravelValidatorneeds to be executed for the suppliedtargetobject- Parameters:
target- the object that is to be validated- Returns:
trueif thisTravelValidatorneeds to be executed
-
validate
Validate the suppliedtargetobject- Parameters:
target- the object that is to be validatederrors- contextual state about the validation processignoreNull- ignore validation for null objects
-