Avoid outputting duplicated alert messages of the validation when changing the value