开发者

email valid in j2me lwuit

开发者 https://www.devze.com 2023-03-24 23:13 出处:网络
I am interested to know whether the email provided by user is validate or 开发者_Python百科not ? I try to use Pattern and Regex , but these classes are not available in lwuit j2me so how can I valid e

I am interested to know whether the email provided by user is validate or 开发者_Python百科not ? I try to use Pattern and Regex , but these classes are not available in lwuit j2me so how can I valid email in such case?


Check if there is exactly one @ symbol, and exactly one . symbol, that . is after the @ at least one letter or number in between, and the length of the trailing part after . is between 2 and 3 letters. Some letters or numbers should be before @.


The only way to validate an email address is to send an email and let the user tell you it arrived.

Email addresses can be very very complicated, so no easy check based on the address as a string will be correct in every case. As a sanity check, I'd check if it contains an @ sign, but nothing more.

0

精彩评论

暂无评论...
验证码 换一张
取 消