MvcTemplate.Components.Mvc.MaxValueAttribute.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, Maximum);
        }
        public override Boolean IsValid(Object value)

Usage Example

        public void FormatErrorMessage_ForDouble()
        {
            attribute = new MaxValueAttribute(13.44);

            String expected = String.Format(Validations.MaxValue, "Sum", attribute.Maximum);
            String actual = attribute.FormatErrorMessage("Sum");

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