function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Nagarajan CNagarajan C 

Is there any way we can validate the data entered by a user on Pre chat form?

Is there any way we can validate the data entered by a user on Pre chat form?

I have created pre chat form in lwc. From conatins firsname and last name.So once user enter value need to check the contact data is correct or not in start button click.(before going to omnichannel flow)
i tried to use apex class pass the first name and laste name get the contact deatails.but showing  You do not have access to the Apex class named

is it possible from baseprechat lwc to call apex class?
VinayVinay (Salesforce Developers) 
Hi Nagarajan,

Not 100% sure but yes I think this can be done,  check below example.

https://rajvakatidotcom.wordpress.com/2017/11/02/live-agent-pre-chat-forms-with-validations/

Thanks,