added max to validator