Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


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

ayescas priority asked 3 years 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 3 years 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.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB jQuery
  • MDB Version: 4.19.1
  • Device: MacBookBook Pro
  • Browser: safari
  • OS: OSX
  • Provided sample code: No
  • Provided link: No