imt.from_string now returns a ValueError and can be used as a validator

This is helpful for the new validation system.