Added on blur validation and state switch.