Html.ValidationFor automatically applies input-validation-error css class to the target textbox. However the css is not mine to edit and I’m not allowed to change it (i.e. rename the sitebuild’s error class to input-validation-error). Can I change the helper applies to the textbox somehow?
Html.ValidationFor automatically applies input-validation-error css class to the target textbox. However the css is
Share
Actually a co-worker of mine solved the issue. HtmlHelper has private static fields (like
ValidationInputCssClassName), which contain the classes as strings.He called SetValue (by Reflection) on them…