Skip to content

Commit

Permalink
#679 | Fix QA issues
Browse files Browse the repository at this point in the history
  • Loading branch information
vinayvenu committed Nov 26, 2021
1 parent f91989d commit e6c37f7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/dataEntryApp/components/NumericFormElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,13 @@ export default ({ formElement: fe, value, update, validationResults, uuid }) =>
);

const error = () => {
if (isNil(value)) {
return false;
if (validationResult && !validationResult.success) {
return true;
}
return fe.concept.isAbnormal(value) || (validationResult && !validationResult.success);
if (fe.concept.isAbnormal(value)) {
return !isNil(value);
}
return false;
};

const textColor = error() ? Colors.ValidationError : Colors.DefaultPrimary;
Expand Down

0 comments on commit e6c37f7

Please sign in to comment.