I think the issue is, that if DataTypeAttribute is the correct place to set the error message for the data typp the it is not being picked up.
luisevalencia: [DataType("Int32", ErrorMessage = "El campo debe ser un entero positivo")]
Hopefuly one of the team can confirm this or correct the place to place the error message to override the default message.
A work around could be to modify the appropriate field templates:
protected void Page_Load(object sender, EventArgs e)
{
TextBox1.ToolTip = Column.Description;
SetUpValidator(RequiredFieldValidator1);
SetUpValidator(CompareValidator1);
SetUpValidator(RegularExpressionValidator1);
SetUpValidator(RangeValidator1);
SetUpValidator(DynamicValidator1);
var dataType = Column.Attributes.OfType()<DataTypeAttribute>.FirstOrDefault();
if (dataType != null)
CompareValidator1.ErrorMessage = dataType.ErrorMessage;
}
Here you can see the addition in BOLD ITALIC this will force the the CompareValidator to show thr correct error message, this will need to be done in all FieldTemplates that the message will be overridden for. The above is the Integer_Edit.ascx.cs file.
Steve

Always seeking an elegant solution.
[Oh! If olny I colud tpye!]
c# Bits blogOh, and don't forget to mark as answer any posts that help you
