check the validation