Skip to content

Adding exclusion validator and support for custom message.

Compare
Choose a tag to compare
@esbanarango esbanarango released this 19 May 02:00
· 768 commits to master since this release
  validations: {
    name: {
      presence: true,
      inclusion: { in: ['Jose Rene', 'Aristi Gol', 'Armani'], message: 'Solo verde a morir' }
    },
    secondName: {
      exclusion: { in: ['Gionvany Hernandez', 'Wilder Medina'], message: 'Que iNrresponsabilidad' }
    },
    bussinessEmail: {
      presence: { message: 'sup dude, where\'s da email' },
      email: { message: 'Be professional ma men' }
    },
    mainstreamCode: {
      format: { with: /^[a-zA-Z]+$/, message: 'nu nu, that\'s not the format' }
    }
    alibabaNumber: {
      numericality: { message: 'is not abracadabra' }
    }
  }