Improve error message on validator

Slight refactor/simplication of .with_value code