On its user input validation, Contact Form 7 has basically emulated the HTML specification and major browser implementations. However, there is a problem. They don’t handle surrounding whitespaces in a consistent way.
Continue reading Consistent handling policy of surrounding whitespacesTag Archives: SWV
Conditional logic validation with the All and Any rules
In the Schema-Woven Validation terminology, a composite rule is a rule that has a set of child rules. Contact Form 7 5.9 and later support composite rule types, all and any, with which you can implement conditional logic in user input validation.
Setting upper limit of checkbox selection
In this recipe, I’ll show you how to implement a user input validation that sets the upper limit of checkbox selection. This validation is based on the Schema-Woven Validation (SWV) mechanism, so it has some big advantages over the previous filter-based validation, such as:
- You can use validation rules already defined by SWV, so you don’t need to code the validation logic yourself.
- Once you create an SWV validation rule, the rule can work anywhere as long as SWV is supported. On the other hand, filter-based validation only works on the server side.