Simplified the validation condition.