Hi Varun
          I want to validate voucherReference field. So I have applied
widget-style to validate-number in the form. Code for validate-number is
already exists in the validation.js file . Still its not validating the
field. 
You can check my form code and the validation field is in bold.


<form name="CreateAcctgTrans" type="single" target="createAcctgTrans"
        header-row-style="header-row" default-table-style="basic-table">
        <actions>
                <set field="isInactive" value="I"/> 
        </actions>
        <auto-fields-service service-name="createAcctgTrans"/>
        <field name="organizationPartyId"><hidden
value="${organizationPartyId}"/></field>
        <field name="acctgTransTypeId">
            <drop-down>
                <entity-options entity-name="AcctgTransType"
description="${description}">
                <entity-constraint name="hasTable" operator="not-equals"
env-name="isInactive"/> 
                    <entity-order-by field-name="description"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="voucherRef" widget-style="validate-number"><text
size="30"/></field>
        <field name="glFiscalTypeId">
            <drop-down>
                <entity-options entity-name="GlFiscalType"
description="${description}" key-field-name="glFiscalTypeId">
                    <entity-order-by field-name="description"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="groupStatusId">
            <drop-down allow-empty="true">
                <entity-options entity-name="StatusItem"
description="${description}" key-field-name="statusId">
                    <entity-constraint name="statusTypeId" operator="equals"
value="ACCTG_ENREC_STATUS"/>
                    <entity-order-by field-name="description"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="fixedAssetId">
            <drop-down allow-empty="true">
                <entity-options entity-name="FixedAsset"
description="${fixedAssetId}">
                    <entity-order-by field-name="fixedAssetId"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="paymentId">
            <lookup target-form-name="LookupPayment" size="20"
maxlength="20"/>
        </field>
        <field name="invoiceId">
            <lookup target-form-name="LookupInvoice" size="20"
maxlength="20"/>
        </field>
        <field name="partyId">
            <lookup target-form-name="LookupPartyName" size="20"
maxlength="20" default-value="${parameters.organizationId}"/>
        </field>

        <field name="roleTypeId">
            <drop-down allow-empty="true">
                <entity-options entity-name="RoleType"
description="${description}">
                        <entity-constraint name="hasTable" operator="not-equals"
env-name="isInactive"/>
                    <entity-order-by field-name="description"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="workEffortId">
            <lookup target-form-name="LookupWorkEffort" size="20"
maxlength="20"/>
        </field>
        <field name="createButton" widget-style="smallSubmit"><submit
button-type="button"/></field>
    </form>

Regards
Prasanthi
-- 
View this message in context: 
http://ofbiz.135035.n4.nabble.com/Form-widget-validation-tp2234816p2303395.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Reply via email to