You need to sign in to do that
Don't have an account?
SF Learner Bee
inputField required is not working in LWC
Hi,
I have below code where the field is made required for user to enter. But its not working where the user is able to skip the field and save the record.Can someone please help me with this as I am new to development.
The code in the LWC component as shown below,
I have below code where the field is made required for user to enter. But its not working where the user is able to skip the field and save the record.Can someone please help me with this as I am new to development.
The code in the LWC component as shown below,
<lightning:layoutItem size = "4" padding = "around-large"--> <lightning:dualListbox aura:id="selectOptions" name="LSE" label= "Who do you speak with?" sourceLabel="Available Options" selectedLabel="Selected Options" options="{! v.listSkillsOptions }" value="{! v.selectedSkillsItems }" onchange="{! c.handleChange }" required="true"/> <!--/lightning:layoutItem>
Hi SF Learner Bee
- If you want to make it required field just use attribute required and not required="true" or required = true
- To not set the required field, simply remove the required attribute.
I hope this helpTry Below Code Please Mark It As best Answer If It Helps Thank You!
Hi,
Use the below code.
Thank YouIs below working for you, because documentation https://developer.salesforce.com/docs/component-library/bundle/lightning-dual-listbox/specification says different