Class ValidationException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.moeen.shared_lib.exception.ValidationException
All Implemented Interfaces:
Serializable

@ResponseStatus(BAD_REQUEST) public class ValidationException extends RuntimeException
Exception for programmatic validation errors that include field paths. Use this when you need to report validation failures from service/business logic with the same structured field-error format as @Valid.

Usage examples:

 // Single field
 throw new ValidationException("email", "already taken");

 // Multiple fields via builder
 throw ValidationException.builder()
         .field("startDate", "must be before endDate")
         .field("endDate", "must be after startDate")
         .build();
 
See Also: