Kooboo / CMS

Old Kooboo CMS, Use Kooboo/Kooboo instead.
http://www.kooboo.com
Other
337 stars 222 forks source link

BUG : Models.Binder.TextContentBinder.ValidateColumn when ErrorMessage == null #323

Open sbrickey opened 9 years ago

sbrickey commented 9 years ago

When the validation's error message is null, exceptions are thrown during instantiation of RuleViolation, since validation.ErrorMessage is used as the formatter of String.Format.

ref: http://forum.kooboo.com/yaf_postsm14126_Unable-to-view-Admin-Content-Search-Indexed-Data.aspx#post14126

When adding validators to the content type, 'error message' should probably be marked as required.

Secondly, ColumnValidation should have an overloaded GetErrorMessageFormat which handles null values (default to localized text?), which should replace the use of ErrorMessage when used by TextContentBinder.ValidateColumn... this will address content upgrades, since historical CMS_Data won't necessarily have "good" data.

EDITS: 2015/04/30 : 9:42PM UTC using latest downloaded v4.3 from CodePlex, which /Admin reports as v4.3.8.218