We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e6e2475 commit 3b8edc4Copy full SHA for 3b8edc4
1 file changed
src/main/java/com/imsweb/validation/functions/MetafileContextFunctions.java
@@ -205,13 +205,8 @@ public int GEN_VAL(Object value) {
205
public boolean GEN_VALID_DATE_IOP(Binding binding, Object value) {
206
String val = GEN_TO_STRING(value);
207
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");
+ if (val == null || val.isEmpty() || !_GEN_VALID_DATE_IOP_P1.matcher(val).matches()) {
+ binding.setVariable(BINDING_KEY_DATE_COMPONENT, "invalid");
215
return false;
216
}
217
0 commit comments