PageSourceSearch

https://www.stirnet.com/wp-content/plugins/memberpress/js/validate.js?ver=4.9.26

js stirnet.com collected 2026-10-02 09:59:19 UTC 1,224 bytes, 35 lines download raw bytes

1/** Some basic methods to validate form elements */
2var mpValidateEmail = function (email) {
3  //In case the email is not entered yet and is not required
4  if(!email || 0 === email.length) {
5    return true;
6  }
7
8  // https://stackoverflow.com/a/46181/6114835
9  // 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,}))$/;
10  var re = /^(([^<>()\[\]\.,;:\s@\"]+(\.[^<>()\[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i; //Accepts unicode???
11  return re.test(email);
12
13  //OLD, but doesn't work super well
14  // var filter = /^[A-Z0-9._'%+-]+@[A-Z0-9.-]+\.[A-Z]{2,25}$/i;
15  // return filter.test(email);
16};
17
18var mpValidateNotBlank = function(val) {
19  return (val && val.length > 0);
20};
21
22var mpToggleFieldValidation = function(field, valid) {
23  field.toggleClass('invalid', !valid);
24  field.toggleClass('valid', valid);
25  field.prev('.mp-form-label').find('.cc-error').toggle(!valid);
26
27  var form = field.closest('.mepr-form');
28
29  if (0 < form.find('.invalid').length) {
30    form.find('.mepr-form-has-errors').show();
31  } else {
32    form.find('.mepr-form-has-errors').hide();
33  }
34};
35

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.