Rule where field is required but Empty Value was not checked /// <summary> /// Validates the Beginning Balance /// </summary> public string ValidateBeginningBalance(decimal? beginningBalance) { string Msg = null; if (mmType.IsEmpty(beginningBalance)) { this.EntityPropertyDisplayName = "Beginning Balance"; Msg = this.RequiredFieldMessagePrefix + this.EntityPropertyDisplayName + this.RequiredFieldMessageSuffix; AddErrorProviderBrokenRule("BeginningBalance", Msg); } return Msg; }
Rule where required but Allow Empty Value was checked /// <summary> /// Validates the Ending Balance /// </summary> public string ValidateEndingBalance(decimal endingBalance) { string Msg = null; if (mmType.IsEmpty(endingBalance, true)) { this.EntityPropertyDisplayName = "Ending Balance"; Msg = this.RequiredFieldMessagePrefix + this.EntityPropertyDisplayName + this.RequiredFieldMessageSuffix; AddErrorProviderBrokenRule("EndingBalance", Msg); } return Msg; }Bottom line is when checking mmType.IsEmtpty you need to pass in the additional parameter of "true"