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
Soundar Rajan PonpandiSoundar Rajan Ponpandi 

Email Validation in Lightning Component

Hi,

I am looking for a email validation in lightning component.

1. Is that possible by using in a component ? without using controller or helper ?

2. If No, Can you guide me to get a following email validation.

3.  It should end with ( .COM). Let's say for example it should the validation if it's  in following format " abc@d.o " .


Regards,
Soundar.
Best Answer chosen by Soundar Rajan Ponpandi
Abdul KhatriAbdul Khatri

Hi Soundar

why don't you use email input type
https://developer.salesforce.com/docs/component-library/bundle/lightning-input/documentation

lightning-input type="email"
                     label="Email">
    </lightning-input>

it has all the validation buolt in

All Answers

Abdul KhatriAbdul Khatri

Hi Soundar

why don't you use email input type
https://developer.salesforce.com/docs/component-library/bundle/lightning-input/documentation

lightning-input type="email"
                     label="Email">
    </lightning-input>

it has all the validation buolt in
This was selected as the best answer
Soundar Rajan PonpandiSoundar Rajan Ponpandi
Hi Abdul,

Perfect .... It's working very cool. We don't need componnet and controller.JS

Thansk for your valuable input.

Regards,
Soundar.
Bates andersonBates anderson
Thanks for the information keep sharing such information alaskasworld (https://www.alaskasworld.me/)
Thanks about Email Validation in Lightning Component