Performance: @Min, @Max for numeric constraints
LOW IMPACT
These annotations affect server-side validation speed and response time but do not impact client-side rendering or page load.
import jakarta.validation.constraints.Min; import jakarta.validation.constraints.Max; public class UserInput { @Min(18) @Max(65) private int age; }
public class UserInput { private int age; // No validation annotations }
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| No @Min/@Max validation | 0 | 0 | 0 | [OK] No impact on frontend but backend slower |
| With @Min/@Max validation | 0 | 0 | 0 | [OK] No frontend impact, better backend validation |