Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TRUNK-6030 : The allergy field in the Allergy UI should validate the input string #4534

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
TRUNK-6030
Removed `allergy.getAllergen() != null &&` as it has already been checked
  • Loading branch information
subhamkumarr committed Jan 17, 2024
commit 4ea96dc45d054ca37a32f18b51b1d17fdbb8b017
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public void validate(Object target, Errors errors) {
}

// Additional validation: Ensure allergen does not contain numeric values
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the comment

if (allergy.getAllergen() != null && StringUtils.isNumeric(allergy.getAllergen().getNonCodedAllergen())) {
if (StringUtils.isNumeric(allergy.getAllergen().getNonCodedAllergen())) {
errors.rejectValue("allergen", "error.allergyapi.allergy.Allergen.cannotContainNumeric");
}

Expand Down