Uploaded image for project: 'PUBLIC - Liferay Alloy UI'
  1. PUBLIC - Liferay Alloy UI
  2. AUI-877

Form Validator - add ability to generate warnings

    Details

      Description

      Currently if any rules defined for the form validator fail, then form submission is prevented.

      I'd like the ability to be able to define rules that display a warning to the user but would not prevent form submission.

      For (a bad!) example, a password field where if the length of the password is X then show a warning but allow the user to keep with the existing value.

      Warnings would be styled in a similar way to existing errors, for example:

      <style>
      	.aui-form-validator-warning-container {
      		color: darkgoldenrod;
      	}
      	.aui-form-validator-warning-field {
      		border-color: #900;
      		border-style: dotted
      	}
      	.aui-form-validator-warning-container .aui-field-element {
      		background: url(/html/themes/control_panel/images/messages/alert.png) no-repeat scroll 100% 50%;
      		padding-right: 20px;
      	}
      	
      	.aui-form-validator-warning-container .aui-field-element {
        display: inline-block; }
        
      	.aui-field-focused .aui-form-validator-message, .aui-form-validator-warning-container .aui-form-validator-message {
        clip: rect(auto auto auto auto); }
      </style>
      

      The style above changes the color of the field and icon to differentiate it from errors. In addition, warnings are always displayed, rather than on hover, to ensure they are visible.

        Attachments

          Activity

            People

            Assignee:
            bruno.santiago Bruno Santiago (Inactive)
            Reporter:
            tim.myerscough Tim Myerscough (Inactive)
            Participants of an Issue:
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              8 years, 9 weeks, 5 days ago

                Packages

                Version Package