<commit_before>import { get, isNil } from 'lodash';

export default function length(field, value, options) {
  let min = get(options, 'min');
  let max = get(options, 'max');

  const exact = get(options, 'exact');
  if (!isNil(exact) && value.length != exact) {
    return 'length.exact';
  }

  if (!isNil(min) && value.length < min) {
    return 'length.min';
  }

  if (!isNil(max) && value.length > max) {
    return 'length.max';
  }<commit_msg>fix: checkstyle violations<commit_after>import { get, isNil } from 'lodash';

export default function length(field, value, options) {
  const min = get(options, 'min');
  const max = get(options, 'max');

  const exact = get(options, 'exact');
  if (!isNil(exact) && value.length !== exact) {
    return 'length.exact';
  }

  if (!isNil(min) && value.length < min) {
    return 'length.min';
  }

  if (!isNil(max) && value.length > max) {
    return 'length.max';
  }
{'fraction_non_alphanumeric': 0.1782608695652174, 'fraction_numerical': 0.0, 'mean_word_length': 3.628140703517588, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '191786', 'n_tokens_mistral': 328, 'n_tokens_neox': 311, 'n_words': 84}