I'm facing problem with validation form

I’m facing problem with validation form
My code is write but it’s not able to validate full form it validate name password confirm password but while the time of mobile number it not able to validate
If I commente out the other code except mobile number then it work
But otherwise it can’t work please check the code and reply me soon

Document body { text-align: center; font-size: 23px; justify-content: center; /* border: 1px solid red; */ height: 400px; }
form {
  width: 700px;
  margin: 20px auto;
  justify-content: center;
  text-align: left;
  border: 3px solid red;
  display: flex;
  flex-direction: column;
}

span {
  color: red;
}

Registrantion form

name:
password:
confirm password:
mobile Number: