18 January 2026:


This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.



Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.

How to check whether the Email id is in correct format xxxx@gsdf.sng

dashboarddashboard Members
edited April 2014 in Sahi - Open Source
Hi All

Please let me know how we can validate that the EMAIL ID entered in Email ID box using SAHI.

Regards
Uday

Answers


  • <browser>
    function validateEmail(email) {

    var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
    return re.test(email);
    }
    </browser>


    _alert(_call (validateEmail("Aaa@sss.ccc")));
    _alert(_call (validateEmail("Aaa@sss")));
Sign In or Register to comment.