Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Form vlidations don't work when included in gridcells #1245

Open
Nisaba opened this issue May 25, 2024 · 0 comments
Open

Form vlidations don't work when included in gridcells #1245

Nisaba opened this issue May 25, 2024 · 0 comments

Comments

@Nisaba
Copy link

Nisaba commented May 25, 2024

Hello,

When the form items are included in gridcells, the validations are disabled.
So the submit is done even if fields are empty or invalid.

Here is my code :

    <j:Form valid="OnSearch()">
        <j:beads>
            <j:FormValidator trigger="{BtValid}" triggerEvent="click" requiredFieldError="Please fill required fields"/>
        </j:beads>  

        <j:Grid>
 	   <j:GridCell desktopNumerator="1" desktopDenominator="4" tabletNumerator="1" tabletDenominator="2" phoneNumerator="1" phoneDenominator="1">
                <j:FormItem label="Currency: " required="true">
                    <j:TextInput localId="txtCurrency" width="90">
                        <j:beads>
                            <j:StringValidator required="3" autoTrim="true" maxLength="3" requiredFieldError="Mandatory"/>
                            <j:UpperCase/>
                        </j:beads>
                    </j:TextInput>
                </j:FormItem>
            </j:GridCell>
	   <j:GridCell desktopNumerator="1" desktopDenominator="4" tabletNumerator="1" tabletDenominator="2" phoneNumerator="1" phoneDenominator="1">
                 <j:FormItem label="Amount: ">
                     <j:NumericStepper localId="nmrAmount" minimum="0" maximum="1000000000" value="0" />
                 </j:FormItem>
	</j:GridCell>
	<j:GridCell desktopNumerator="1" desktopDenominator="4" tabletNumerator="1" tabletDenominator="2" phoneNumerator="1" phoneDenominator="1">
                <j:FormItem label="Providers: " required="true">
                    <j:HGroup gap="5" itemsVerticalAlign="itemsCenter">
                        <j:beads>
                            <j:CheckBoxValidator required="1" requiredFieldError="Please choose at least 1 provider"/>
                        </j:beads>
                        <j:CheckBox id="chkProvider1" text="Provider 1"/>
                        <j:CheckBox id="chkProvider2" text="Provider 2"/>
                        <j:CheckBox id="chkProvider3" text="Provider 3"/>
                    </j:HGroup>      
                </j:FormItem>   
	</j:GridCell>
        </j:Grid>
    </j:Form>

Thank you for your help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant