vf_format: check input validity