code: 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;
                  }
              }
docs: add custom validation