Skip to content

Commit eae5bd6

Browse files
authored
BeforeOrEqual null compare
This validator fails when comparing to another field that is null
1 parent 0f6c4e6 commit eae5bd6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

models/validators/BeforeOrEqualValidator.cfc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ component
5858
"get#arguments.validationData#"
5959
);
6060
}
61+
62+
// return true if no value to compare against
63+
if ( isNull( compareValue ) || isNullOrEmpty( compareValue ) ) {
64+
return true;
65+
}
6166

6267
/**
6368
* -1 if date1 is before than date2

0 commit comments

Comments
 (0)