Add min/max dimension validator and make most error messages customisable.