guillaumepotier/Parsley.js — pull request #441 by jna-unikent (2013-11-28 13:17:06+00:00)
Title: Allow validation of elements that are blank and arn't required in and of themselves

I wrote the following custom validation that makes a field required only if another field is set to a specified value.
```
requiredif: function () {
var that = this;
return {
validate: function (val , param, self) {
var params = param.split("=");

if(params.length !== 2){
return true;
}
var element = params[0];
var compare_value = params[1];
return $('#' + element).val() === compare_value ? that.required().validate(val) : true;
},
priority: 612
}
}
```
After a while of wondering why my validation wasn't running on the element, I realised that parsley wont validate a field that is blank and is not explicit set to be required.

This change allows the validation of an element that is blank and isn't required by adding it's selector to the 'allowCustomRequired' option.

Do let me know is there is a better way around the issue too.

Thanks