Integer DataType Check Validation on the metadata class RRS feed

  • Question

  • User-1759624489 posted


    I have a table with some integer columns


    I put the following

      [DisplayName("Metros Cuadrados")]
            [Required(ErrorMessage = "Este campo es Requerido")]       
            [Range(0,int.MaxValue, ErrorMessage="El valor debe ser un entero positivo")]
            public object SquareMeters { get; set; }


    However the validator is throwing first the DataType exception that says:

    The field Metros Cuadrados must be a valid Integer.

    How can I change that message??





    Thursday, September 4, 2008 1:00 PM


  • User-797310475 posted

    You need to set that error message on the CompareValidator in your Integer_Edit field template.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, September 4, 2008 3:22 PM