Jasmine tests of validation utility

This includes a modification of the validation utility which has it perform min and max length checks on optional fields. Originally, an optional field could exceed its maximum character limit, and fall below its minimum character limit - only email validation was performed.

@AlasdairSwan and/or @wedaly, how's it look?