Skip to content

Commit 3b8edc4

Browse files
committed
Fixed error message.
1 parent e6e2475 commit 3b8edc4

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

src/main/java/com/imsweb/validation/functions/MetafileContextFunctions.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -205,13 +205,8 @@ public int GEN_VAL(Object value) {
205205
public boolean GEN_VALID_DATE_IOP(Binding binding, Object value) {
206206
String val = GEN_TO_STRING(value);
207207

208-
if (val == null || val.isEmpty()) {
209-
binding.setVariable(BINDING_KEY_DATE_COMPONENT, "date is an empty string");
210-
return false;
211-
}
212-
213-
if (!_GEN_VALID_DATE_IOP_P1.matcher(val).matches()) {
214-
binding.setVariable(BINDING_KEY_DATE_COMPONENT, "date format must be CCYYMMDD");
208+
if (val == null || val.isEmpty() || !_GEN_VALID_DATE_IOP_P1.matcher(val).matches()) {
209+
binding.setVariable(BINDING_KEY_DATE_COMPONENT, "invalid");
215210
return false;
216211
}
217212

0 commit comments

Comments
 (0)