Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-51307

aui:validator required is not working for checkbox

    Details

      Description

      Having the next code in a aui-form:

      <aui:form>
      	<aui:input type="checkbox" name="hello">
      		<aui:validator name="required" />
      	</aui:input>
      	<aui:button type="submit" name="submit" />
      </aui:form>
      

      It's expected that the form will not be send onSubmit if the checkbox is not selected.

      Currently if the user clicks the submit button a javascript error is throught and the form is submitted.

      Note: The same validator works for other inputs, eg fort text.

      Steps to reproduce:

      1. deploy the attached auiform-portlet-6.2.0.1.war
      2. add the AUI Form portlet to a page
      3. click submit

        Attachments

        1. auiform-portlet-6.2.0.1.war
          24 kB
        2. fixed.png
          fixed.png
          11 kB
        3. reproduced.png
          reproduced.png
          15 kB

          Issue Links

            Activity

              People

              Assignee:
              yvonne.han Yvonne Han
              Reporter:
              jose.jimenez Jose Jimenez
              Participants of an Issue:
              Recent user:
              Esther Sanz
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                6 years, 48 weeks, 6 days ago

                  Packages

                  Version Package
                  6.2.2 CE GA3
                  6.2.X EE
                  7.0.0 M3