function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
Hi Himanshu,
You can utilize "onchange" event on lightning-textarea fields and call a method in JS to validate the input. For instance :
HTML: <lightning-textarea name="input2" label="Textarea field with a predefined value" value="initial value" onchange={handleChange} data-field="textArea1" > </lightning-textarea> JS : handleChange() { let textAreaField = this.template.querySelector('[data-field = "textArea1"]'); if (textAreaField.value.match('[\\p{L}\\s\\d]*$')) { textAreaField.setCustomValidity('Invalid entry'); } else { textAreaField.setCustomValidity(''); } return textAreaField.reportValidity(); }
Hi Himanshu,
You can utilize "onchange" event on lightning-textarea fields and call a method in JS to validate the input. For instance :
Please mark it as best answer if this solves your issue.
Thank you,
Vinay.