I\'ve created my own data transformer, as explained in the dedicated cookbook, here is my reverse transformation:
public function reverseTransform($val) { //
Sort answer is: You don't. The transformers job is to, well, transform and not to do error checking.
Add a constraint to the field which will check the transformed value and take care of error messaging.