How i can change css styles of input fields and labels when alloy ui form validator detect a empty field?
This is one of the fields
<label for='<portlet:namespace  />formnumdoc'>
    <liferay-ui:message key="formulario.DOCUMENT"/><span class="red_mini">*</span>
</label>
<input type='text' id='<portlet:namespace  />formnumdoc' name='formnumdoc' />
And this is Alloy Ui script
YUI().use('aui-form-validator', function(Y) {
    new Y.FormValidator({
        boundingBox : '#frmEntity',
        rules : {
            formnumdoc : {
                required : true
            }
        },
        fieldStrings: {
            formnumdoc: {
                required: '<liferay-ui:message key="formulario.REQUIRED_FIELD_ALERT"/>'
              }
            }
    });
});
Aucun commentaire:
Enregistrer un commentaire