Correct regex pattern for case-insensitive match
Updated the regex pattern in `StaffAppFormData.java` to ensure that the "yes" or "no" answers are case-insensitive. This improves the form validation to accept "Yes", "YES", "No", or "NO" without errors.
This commit is contained in:
parent
514aaeb367
commit
9e0a33e782
|
|
@ -45,7 +45,7 @@ public class StaffAppFormData extends Form {
|
|||
|
||||
@NotEmpty(message = "An answer is required")
|
||||
@Length(min = 2, max = 3, message = "Please answer yes or no")
|
||||
@Pattern(regexp = "(yes|no)$", message = "Yes or no")
|
||||
@Pattern(regexp = "(?i)^(yes|no)$", message = "Yes or no")
|
||||
public final String pc_requirements;
|
||||
|
||||
@Min(value = 0, message = "Please enter a valid age")
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user