validateWith

Sets the state validator directly.