How about the following interface instead: validate can either throw an Error, in which case the message passed to the error is the error string displayed, or return (without a value) in which case the field is valid.