My required field condition is not working