My Photo

Microsoft Dynamics 365

Official Blog for Microsoft Dynamics Functional and Technical Solutions....
Browsing Category " PORTAL "

EMAIL , ZIPCODE , CONTACT NO VALIDATION USING JAVASCRIPT IN PORTAL / HTML

Java-Script Validation can be used in portal in html , php , java etc .


1. Email Validation : We have used an Regex here , and compared the text in input with it and given an alert.

    function validateemail() {
        var ccc = document.getElementById( 'idemailtb').value;
        var reg = /^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/
        if (!reg.test(ccc)) {
        alert( "Invalid Email Id");
          }
    }