Add "format" validation support

User-supplied functions are attached to particular "format" values.