Skip to content

Commit

Permalink
Merge pull request #1194 from ombhardwajj/catchmentfix
Browse files Browse the repository at this point in the history
Empty catchment name will no more be accepted!
  • Loading branch information
vinayvenu authored Apr 15, 2024
2 parents 8b12afe + 0407d5d commit e8a4f39
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/adminApp/catchment.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ const validateCatchment = (values, allLocations) => {
const errors = {};
if (!allLocations) return errors;
if (_.isEmpty(values.locationIds)) errors.locationIds = ["It can not be empty"];
if (!values.name || !values.name.trim()) {
errors.name = ["Catchment name should contain at least one non-whitespace character"];
}
return errors;
};

Expand Down

0 comments on commit e8a4f39

Please sign in to comment.