MvcTemplate.Components.Mvc.GreaterThanAttribute.FormatErrorMessage C# (CSharp) Method

FormatErrorMessage() public method

public FormatErrorMessage ( String name ) : String
name String
return String
        public override String FormatErrorMessage(String name)
        {
            return String.Format(ErrorMessageString, name, Minimum);
        }
        public override Boolean IsValid(Object value)

Usage Example

コード例 #1
0
        public void FormatErrorMessage_ForDouble()
        {
            attribute = new GreaterThanAttribute(12.56);

            String expected = String.Format(Validations.FieldMustBeGreaterThan, "Sum", attribute.Minimum);
            String actual = attribute.FormatErrorMessage("Sum");

            Assert.Equal(expected, actual);
        }
All Usage Examples Of MvcTemplate.Components.Mvc.GreaterThanAttribute::FormatErrorMessage