Adding or removing a validator dynamically