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

Race condition causing custom validation rules to be ignored

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Duplicate
    • Affects Version/s: 6.1.X EE, 6.2.X EE, 7.0.0 Alpha 1
    • Fix Version/s: 6.2.X EE, 7.0.0 M4
    • Component/s: Web Form
    • Labels:
      None
    • Fix Priority:
      3

      Description

      This is tricky, because it depends on another bug to see the effect. That bug will be fixed in AUI-1958. Don't test this with AUI-1958 in place.

      NOTE: Test may need to be repeated because of race condition. Validation messages may change (will fix in AUI-1958). This is fine.

      Replication Steps:

      1. In portal-web\docroot\html\portlet\breadcrumb\view.jsp, paste the sample code.
      2. Add Breadcrumb portlet to the page.
      3. Refresh the page.
      4. Click into first Field, "Email Only".
      5. Tab through the rest of the fields.

      Expected Results:
      Both "Email Custom" and "Email Custom Rev" has validation error. Because the value is blank (AUI-1958 bug).

      Actual Results:
      Either or both "Email Custom" and "Email Custom Rev" shows no validation error.

      Sample Code:

      <aui:form action="${submitUrl}" method="post" name="fm2">
      	<aui:input name="EmailOnly" label="Email Only" value="">
      		<aui:validator name="email"/>
      	</aui:input>
      
      	<aui:input name="EmailCustom" label="Email Custom" value="">
      		<aui:validator name="email"/>
      		<aui:validator  name="custom"  errorMessage="Always fails!!!!" >
      			function (val, fieldNode, ruleValue) {
      				return false;
      			}
      		</aui:validator>
      	</aui:input>
      
      	<aui:input name="EmailCustomRev" label="Email Custom Rev" value="">
      		<aui:validator  name="custom"  errorMessage="Always fails!!!!" >
      			function (val, fieldNode, ruleValue) {
      				return false;
      			}
      		</aui:validator>
      		<aui:validator name="email"/>
      	</aui:input>
      </aui:form>
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              byran.zaugg Byran Zaugg (Inactive)
              Reporter:
              byran.zaugg Byran Zaugg (Inactive)
              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, 9 weeks, 3 days ago

                  Packages

                  Version Package
                  6.2.X EE
                  7.0.0 M4