title: Why i'm getting the option to use nodeValue insted of just Value?
body: <p>i'm writing an html page that gets a name, an address and a phone number to practice validation. when the javascript function tries to get the length of the value in the inputs i get this error: "Uncaught TypeError: Cannot read property 'length' of null"</p>
  
  <p>i dont know what nodeValue means but i simply want to get the value in the input.</p>
  
  <p>this is the part of the code in the javascript that gives me the error:</p>
  
  <pre><code>function Validate(nameInput, lastNameInput, addressInput, phoneInput)
  {
  
  var errorSpan = document.getElementById("errorSpan");
  var okSpan = document.getElementById("okSpan");
  
  var nameErrSpan = document.getElementById("nameErrSpan");
  var lastNameErrSpan = document.getElementById("lastNameErrSpan");
  var addressErrSpan = document.getElementById("addressErrSpan");
  var phoneErrSpan = document.getElementById("phoneErrSpan");
  
  var nameLength = nameInput.nodeValue.length;
  var lNameLength = lastNameInput.nodeValue.length;
  var addressLength = addressIput.nodeValue.length;
  var phoneLength = phoneInput.nodeValue.length;
  </code></pre>
  
  <p>what do i need to change to just get the value in the inputs and measure them?</p>
  
  <p>here is my html code:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
  &lt;title&gt;Validation Form&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;div&gt;
      &lt;span&gt;First name:&lt;/span&gt;&lt;br /&gt;
      &lt;input type="text" id="firstName" /&gt; &lt;span id="nameErrSpan" class="nHidden"&gt;Name Must Be Between 3 - 10 Letters&lt;/span&gt;
      &lt;br&gt;
  
  
      &lt;span&gt;Last name:&lt;/span&gt;&lt;br /&gt;
      &lt;input type="text" id="lastName" /&gt; &lt;span id="lastNameErrSpan" class="lnHidden"&gt;Last Name Must Be Between 3 - 10 Letters&lt;/span&gt;
      &lt;br&gt;
  
      &lt;span&gt;Address:&lt;/span&gt;&lt;br /&gt;
      &lt;input type="text" id="address" /&gt; &lt;span id="addressErrSpan" class="adHidden"&gt;Address Must Be Between 10 - 25 Letters&lt;/span&gt;
      &lt;br&gt;
  
      &lt;span&gt;Phone number:&lt;/span&gt;&lt;br /&gt;
      &lt;input type="text" id="phoneNumber" /&gt; &lt;span id="phoneErrSpan" class="pHidden"&gt;Phone Must Be Between 3 - 10 Digits&lt;/span&gt;
      &lt;br&gt;
  
      &lt;button onclick="Validate(firstName, lastName, address, phoneNumber)"&gt;Check&lt;/button&gt;&lt;br /&gt;
  
      &lt;span id="errorSpan" class="hidden"&gt;Missing fields&lt;/span&gt;&lt;br /&gt;
      &lt;span id="okSpan" class="hidden"&gt;All fields are filled&lt;/span&gt;&lt;br /&gt;
  
      &lt;button onclick="reset()"&gt;Reset&lt;/button&gt;&lt;br /&gt;
  
  
  &lt;/div&gt;
  
  &lt;link rel="stylesheet" href="registrationForm.css"&gt;
  &lt;script src="registrationForm.js"&gt;&lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>