select drop down won't validate using html 5 required


Topic: select drop down won't validate using html 5 required

ayescas pro asked 6 days ago

Hello,

How can I validate a select drop-down. The following select won't validate, it will always return true when null.

      <select class="mdb-select md-form md-outline colorful-select dropdown-primary" 
      required
      id="g_type" 
      name="g_type">

        <option value="" disabled selected>Request Type:</option>
        <option value="Interpretation">Interpretation</option>
        <option value="Translation">Translation</option>

        </select>


        <label class="mdb-main-label">Request Type</label>
        </div>

enter image description here


Marcin Luczak staff answered 6 days ago

Hi,

For non Material Select validation please see my snippet and also check forms validation documentation. For Material Select validation please see its own validation example.

Regards, Marcin


Please insert min. 20 characters.
Status

Answered

Specification of the issue
  • User: Pro
  • Premium support: No
  • Technology: jQuery
  • MDB Version: 4.19.1
  • Device: MacBookBook Pro
  • Browser: safari
  • OS: OSX
  • Provided sample code: No
  • Provided link: No
Tags