<commit_before><?php defined( 'ABSPATH' ) or die();

/**
 * Form_Validation validate a form
 *
 * Validates a form against an array of rules using Valitron
 *
 * @since 0.1.0
 */
class Form_Validation {

  /**
   * Form identifier
   *
   * @since 0.1.0
   * @access public
   * @var string $action
   */
  public $action;

  /**
   * Validation rules
   *
   * @since 0.1.0
   * @access public
   * @var array $rules Form validation rules.
   */
  public $rules;
  public $rules = array();

  /**
   * Error message overrides
   *
   * @since 0.4.0
   * @access public
   * @var array $messages The field/rule paired messages.
   */
  public $messages = array();

  /**
   * User input from failed validation
   *
   * @since 0.2.1
   * @access public
   * @var array $input Form validation rules.
   */
  public $input;

  /**
   * Result from wp_nonce_field()
   *
   * @since 0.3.0
   * @access public
   * @var string $nonce_field WP rendered nonce field.
   */
  public $nonce_field;


  /**
   * Class constructor
   * check if action parameter matches sane $_POST action value
   * init only if true
   *
   * @since 0.1.0
   * @since 0.4.0 Reduced to single parameter
   * @param array $form Form configuration (rules, action)
   *
   */
  function __construct( $form ) {
    $this->is_retry();
    $this->set_config( $form );
    $this->create_nonce_field();
    $this->add_actions();

  /**<commit_msg>typecast rules and input properties as arrays<commit_after><?php defined( 'ABSPATH' ) or die();

/**
 * Form_Validation validate a form
 *
 * Validates a form against an array of rules using Valitron
 *
 * @since 0.1.0
 */
class Form_Validation {

  /**
   * Form identifier
   *
   * @since 0.1.0
   * @access public
   * @var string $action
   */
  public $action;

  /**
   * Validation rules
   *
   * @since 0.1.0
   * @access public
   * @var array $rules Form validation rules.
   */
  public $rules = array();

  /**
   * Error message overrides
   *
   * @since 0.4.0
   * @access public
   * @var array $messages The field/rule paired messages.
   */
  public $messages = array();

  /**
   * User input from failed validation
   *
   * @since 0.2.1
   * @access public
   * @var array $input Form validation rules.
   */
  public $input = array();

  /**
   * Result from wp_nonce_field()
   *
   * @since 0.3.0
   * @access public
   * @var string $nonce_field WP rendered nonce field.
   */
  public $nonce_field;


  /**
   * Class constructor
   * check if action parameter matches sane $_POST action value
   * init only if true
   *
   * @since 0.1.0
   * @since 0.4.0 Reduced to single parameter
   * @param array $form Form configuration (rules, action)
   *
   */
  function __construct( $form ) {
    $this->is_retry();
    $this->set_config( $form );
    $this->create_nonce_field();
    $this->add_actions();

  /**
{'fraction_non_alphanumeric': 0.1322343037530691, 'fraction_numerical': 0.01683619782532445, 'mean_word_length': 2.4237695078031214, 'pattern_counts': {'":': 0, '<': 5, '<?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': '6686099', 'n_tokens_mistral': 978, 'n_tokens_neox': 943, 'n_words': 283}