<commit_before>/* eslint-disable no-useless-escape */

import React from 'react';
import { PropTypes as Types } from 'prop-types';
import { FormattedMessage } from 'react-intl';

export function emailValidator(value) {
  return value &&
    !/^(([^<>()\[\]\.,;:\s@\"]+(\.[^<>()\[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()\.,;\s@\"]+\.{0,1})+[^<>()\.,;:\s@\"]{2,})$/.test(
      value,
    )
    ? 'invalid.email'
    : undefined;
}

export function requiredField(value) {
  return value ? undefined : 'required.field';
}
<commit_msg>Remove unnecessary escapes from e-mail regex<commit_after>import React from 'react';
import { PropTypes as Types } from 'prop-types';
import { FormattedMessage } from 'react-intl';

export function emailValidator(value) {
  return value &&
    !/^(([^<>()[\].,;:\s@"]+(\.[^<>()[\].,;:\s@"]+)*)|(".+"))@(([^<>().,;\s@"]+\.?)+[^<>().,;:\s@"]{2,})$/.test(
      value,
    )
    ? 'invalid.email'
    : undefined;
}

export function requiredField(value) {
  return value ? undefined : 'required.field';
}

{'fraction_non_alphanumeric': 0.2954324586977648, 'fraction_numerical': 0.003887269193391642, 'mean_word_length': 3.7465437788018434, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5197410', 'n_tokens_mistral': 384, 'n_tokens_neox': 368, 'n_words': 68}