code: function(field, options) {
      if (Array.isArray(field)) {
        return this.validateFieldsHelper(
          field,
          [options],
          this.validatesNumericalityOf
        )
      }
  
      return this.validates(field, function() {
        var valid = true
        var value = this[field]
  
        if (options.eq !== undefined && options.eq !== value) valid = false
        if (options.gt !== undefined && options.gt >= value) valid = false
        if (options.gte !== undefined && options.gte > value) valid = false
        if (options.lt !== undefined && options.lt <= value) valid = false
        if (options.lte !== undefined && options.lte < value) valid = false
        if (options.even !== undefined && value % 2 === 1) valid = false
        if (options.odd !== undefined && value % 2 === 0) valid = false
  
        if (options.allow_null === true && value === null) valid = true
  
        if (!valid) this.errors.add(field, 'not a valid number')
        return valid
      })
    }
docs: This validator checks if the given field`s values length.
  @class Definition
  @method validatesNumericalityOf
  @param {string} field - The field to validate
  @param {object} options - The options hash
  
  @options
  @param {boolean} allow_null - Skip validation if value is null
  @param {integer} eq - value need to be equal `eq`
  @param {integer} gt - value need to be greater than `gt`
  @param {integer} gte - value need to be greater than or equal `gte`
  @param {integer} lt - value need to be lower than `lt`
  @param {integer} lte - value need to be lower than or equal `lte`
  @param {boolean} even - value need to be even
  @param {boolean} off - value need to be odd
  
  @return {Definition}