PageSourceSearch

https://www.photo-mosaic.co.uk/wp-content/themes/FME/js/validation.js

js photo-mosaic.co.uk collected 2026-09-26 05:36:16 UTC 1,131 bytes, 38 lines download raw bytes

1function ValidateMail(email) {
2    var regex = /^(([^<>()[\]\\.,;:\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,}))$/;
3    if ( regex.test(email) ) {
4        return true;
5    }
6}
7
8
9function ValidateForm(element) {
10    var errors = 0;
11    element.find('.js-required').each(function(){
12        if (jQuery(this).is('input')) {
13            var string = jQuery(this).val();
14        } else if (jQuery(this).is('textarea')) {
15            var string = jQuery(this).val();
16        }
17        
18        if (string.trim() != '') {
19            if (jQuery(this).hasClass('email')) {
20                if (ValidateMail(jQuery(this).val())){
21                    jQuery(this).removeClass('error');
22                } else {
23                    errors++;
24                    jQuery(this).addClass('error');
25                }
26            } else {
27                jQuery(this).removeClass('error');
28            }
29        } else {
30            errors++;
31            jQuery(this).addClass('error');
32        }
33    });
34    
35    if (errors == 0) {
36        return true;
37    }
38}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.