File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed
DigitalLearningSolutions.Web/Controllers/SuperAdmin/Centres Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -487,17 +487,8 @@ public IActionResult EditContractInfo(ContractTypeViewModel contractTypeViewMode
487487 {
488488 if ( ( day != 0 && day != null ) | ( month != 0 && month != null ) | ( year != 0 && year != null ) )
489489 {
490- var validationResult = OldDateValidator . ValidateDate ( day ?? 0 , month ?? 0 , year ?? 0 ) ;
491- if ( day != null && month != null && year != null )
492- {
493- var today = new DateTime ( year ?? 0 , month ?? 0 , day ?? 0 ) ;
494- if ( today == DateTime . Now . Date )
495- {
496- validationResult . DateValid = true ;
497- validationResult . ErrorMessage = "" ;
498- }
499- }
500- if ( ! validationResult . DateValid )
490+ var validationResult = DateValidator . ValidateDate ( day ?? 0 , month ?? 0 , year ?? 0 ) ;
491+ if ( validationResult . ErrorMessage != null )
501492 {
502493 if ( day == null ) day = 0 ;
503494 if ( month == null ) month = 0 ;
You can’t perform that action at this time.
0 commit comments