Jasmine tests of validation utility

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