jeudi 22 décembre 2016

Address validation regex. What does this Rails validation mean?

I have a Rails validation that reads:

validates :address_line_1, format: {
    if: :changed?,
    without: /^[0-9]+$/,
    multiline: true,
    message: I18n.t(
      :missing_street_info, scope: 'activerecord.errors.models.address'
    )
  }

What does the without section mean? What is that regex? What is the multiline key mean?

Aucun commentaire:

Enregistrer un commentaire