Skip to main content

Tag: sitecore

Validating file uploads in Sitecore WFFM

Our Sitecore installation was in dire need of a way to lock down file uploads on forms built with the Web Forms for Marketers (WFFM) module; out of the box, it doesn't do any checking at all, which can lead to some risky situations. I tacked on a simple whitelist …

Continue reading

Image dimension Field Validator for Sitecore CMS

This StandardValidator extension will determine whether or not a given ImageField's source image's height and width match with given parameters. Either parameter can be omitted if, for instance, you only care about validating the width of an image (or conversely, only the height).

Note: In the code below, replace …

Continue reading

Currency Field Validator for Sitecore CMS

This StandardValidator extension will determine whether or not a given field value passes for currency. In order to do so, it must meet the following requirements:

  1. It must pass decimal.TryParse()
  2. It must not have more than 2 digits past the decimal point

Obviously, this does not fit all international …

Continue reading