Tags: 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 attribute to the UploadFile control, and our security engineer can breathe easy. Read More →

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 systems—however, in my case, it works for my project (which does not require localization). The code could easily be customized to accommodate additional formats. Read More →