1

Why the form validation does not work on Safari ?

I tried not to load the JHTML::_(behavior.formvalidator)

I load the fields from the XML file

<field 
    name="title" 
    type="text"
    label="COM_MYCOMP_LBL_TITLE"
    required="true"  
    class="form-control"
/> 

With this result

<input id="jform_title" class="form-control required" type="text" aria-required="true" required="required" value="" name="jform[title]">

This result contains the attributes of validation aria-required="true" required="required" that I would not use

How do I turn off html5fallback.js and use a different library of validation ?

1 Answer 1

4

The required="required" is standard HTML5 validation, - the html5fallback.js is just a polyfill for those browsers that do not support html5 validations.

To answer your question add novalidate to your <form> markup:

<form novalidate>
....
</form>

This turns off html5 validation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.