You need to sign in to do that
Don't have an account?
Naveen Kumar 964
validation in LWC
I have lightning input type is string if it is more than 10 should show an error at input level when I moved the cursor to other field please suggest me on this
<lightning-input type="text" label="Enter some text" max-length=10
message-when-too-long="Max 10 characters allowed" ></lightning-input>
<lightning-input type="text" label="Enter some text" max-length=10
message-when-too-long="Max 10 characters allowed" ></lightning-input>
Check below similar reference that can help you.
https://salesforce.stackexchange.com/questions/160160/show-custom-error-on-lightninginput
Thanks,