dist/vacationApproval/node-business-rules.js
function (args) {
                args.HasError = false;
                args.ErrorMessage = "";

                var greaterThanToday = new VacationApproval.FromToDateValidator();
                greaterThanToday.FromOperator = 4 /* GreaterThanEqual */;
                greaterThanToday.From = new Date();
                greaterThanToday.ToOperator = 1 /* LessThanEqual */;
                greaterThanToday.To = this.Duration.From;
                greaterThanToday.IgnoreTime = true;

                if (!greaterThanToday.isAcceptable(this.Approval.ApprovedDate)) {
                    args.HasError = true;
                    args.ErrorMessage = greaterThanToday.customMessage({
                        "Format": "MM/DD/YYYY",
                        "Msg": "Date must be between ('{From}' - '{To}')."
                    }, greaterThanToday);
                    args.TranslateArgs = { TranslateId: greaterThanToday.tagName, MessageArgs: greaterThanToday, CustomMessage: greaterThanToday.customMessage };
                    return;
                }
            }
function (args) {
                args.HasError = false;
                args.ErrorMessage = "";

                var greaterThanToday = new VacationApproval.FromToDateValidator();
                greaterThanToday.FromOperator = 4 /* GreaterThanEqual */;
                greaterThanToday.From = new Date();
                greaterThanToday.ToOperator = 1 /* LessThanEqual */;
                greaterThanToday.To = this.Duration.From;
                greaterThanToday.IgnoreTime = true;

                if (!greaterThanToday.isAcceptable(this.Approval.ApprovedDate)) {
                    args.HasError = true;
                    args.ErrorMessage = greaterThanToday.customMessage({
                        "Format": "MM/DD/YYYY",
                        "Msg": "Date must be between ('{From}' - '{To}')."
                    }, greaterThanToday);
                    args.TranslateArgs = { TranslateId: greaterThanToday.tagName, MessageArgs: greaterThanToday, CustomMessage: greaterThanToday.customMessage };
                    return;
                }
            }
function ( args ) { args . HasError = false ; args . ErrorMessage = "" ; var greaterThanToday = new VacationApproval . FromToDateValidator ( ) ; greaterThanToday . FromOperator = 4 /* GreaterThanEqual */ ; greaterThanToday . From = new Date ( ) ; greaterThanToday . ToOperator = 1 /* LessThanEqual */ ; greaterThanToday . To = this . Duration . From ; greaterThanToday . IgnoreTime = true ; if ( ! greaterThanToday . isAcceptable ( this . Approval . ApprovedDate ) ) { args . HasError = true ; args . ErrorMessage = greaterThanToday . customMessage ( { "Format" : "MM/DD/YYYY" , "Msg" : "Date must be between ('{From}' - '{To}')." } , greaterThanToday ) ; args . TranslateArgs = { TranslateId : greaterThanToday . tagName , MessageArgs : greaterThanToday , CustomMessage : greaterThanToday . customMessage } ; return ; } }
add custom validation
add custom validation