<commit_before>import { ValidationMessageGenerator } from '../../shared';

export interface VeeValidateConfig {
  bails: boolean;
  generateMessage: ValidationMessageGenerator;
  skipOptional: boolean;
}

const DEFAULT_CONFIG: VeeValidateConfig = {
  generateMessage: ({ field }) => `${field} is not valid.`,
  skipOptional: true,
  bails: true,
};

export let currentConfig: VeeValidateConfig = { ...DEFAULT_CONFIG };

export const getConfig = () => currentConfig;

export const setConfig = (newConf: Partial<VeeValidateConfig>) => {
  currentConfig = { ...currentConfig, ...newConf };
};

export const configure = (cfg: Partial<VeeValidateConfig>) => {
  setConfig(cfg);
};<commit_msg>feat: deprecate the skipOptional config<commit_after>import { ValidationMessageGenerator } from '../../shared';

export interface VeeValidateConfig {
  bails: boolean;
  generateMessage: ValidationMessageGenerator;
}

const DEFAULT_CONFIG: VeeValidateConfig = {
  generateMessage: ({ field }) => `${field} is not valid.`,
  bails: true,
};

export let currentConfig: VeeValidateConfig = { ...DEFAULT_CONFIG };

export const getConfig = () => currentConfig;

export const setConfig = (newConf: Partial<VeeValidateConfig>) => {
  currentConfig = { ...currentConfig, ...newConf };
};

export const configure = (cfg: Partial<VeeValidateConfig>) => {
  setConfig(cfg);
};
{'fraction_non_alphanumeric': 0.13821138211382114, 'fraction_numerical': 0.0, 'mean_word_length': 5.071748878923767, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 15, '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': '786712', 'n_tokens_mistral': 381, 'n_tokens_neox': 389, 'n_words': 98}