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

<aui:validator /> tags cannot be used within <aui:select /> tag

    Details

      Description

      Reproduction steps (aui:validator):
      1) Add the following code the Breadcrumbs:

      • docroot/html/portlet/breadcrumb/view.jsp (6.2)
      • modules\apps\web-experience\site-navigation\site-navigation-breadcrumb-web\src\main\resources\META-INF\resources\view.jsp (7.0)
        <aui:form method="post" name="fmr">
            <aui:select name="sampleDropdownr" label="">
                <aui:option selected="true" value="">Select an Option</aui:option>
                <aui:option value="1">Option 1</aui:option>
                <aui:option value="2">Option 2</aui:option>
                <aui:option value="3">Option 3</aui:option>
        
                <aui:validator name="required" />
                <aui:validator name="min">2</aui:validator>
            </aui:select>
        
            <aui:button value="Save" type="submit"></aui:button>
        </aui:form>
        

      2) Deploy the portlet
      4) Place it on a page

      Expected Behavior:

      • The portlet to render and work normally according to the validation rules.

      Actual Behavior:

      • The portlet will give an error "Breadcrumb is temporarily unavailable."
      • Tomcat console error.

      Reproduction steps (Model Hints):
      1) Add the following code the Model Hints & Users Admin:

      • portal-impl/src/META-INF/portal-model-hints.xml
         	<model name="com.liferay.portal.model.Phone">
         +		<field name="bztest" type="int">
         +			<validator name="min">2</validator>
         +			<validator name="required" />
         +		</field>
        
      • portal-web/docroot/html/portlet/users_admin/common/phone_numbers.jsp (6.2)
        			<div class="row-fields">
          				<aui:input name='<%= "phoneId" + phonesIndex %>' type="hidden" value="<%= phone.getPhoneId() %>" />
          
         +		<aui:select name="bztest" label="">
         +		        <aui:option selected="true" value="">Select an Option</aui:option>
         +		        <aui:option value="1">Option 1</aui:option>
         +		        <aui:option value="2">Option 2</aui:option>
         +		        <aui:option value="3">Option 3</aui:option>
         +		</aui:select>
        

      2) Rebuild portal-impl & portal-web. Maybe rebuild Portal?
      3) Navigate to:

      • My Account > Phone Numbers (6.2)
      • My Account > Account Settings > Identification > Phone Numbers (7.0)

      Expected Behavior:

      • Validation is run on the new bztest select field, according to the validation rules.

      Actual Behavior:

      • No validation is run on the new bztest select field.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  2 years, 25 weeks, 4 days ago

                  Packages

                  Version Package
                  6.2.X EE
                  7.0.0 DXP SP2
                  7.0.0 DXP FP13
                  7.0.0 DXP SP3
                  7.0.3 CE GA4
                  Master