Question: Address validation regex. What does this Rails validation mean?

Question

Address validation regex. What does this Rails validation mean?

Answers 0
Added at 2016-12-22 18:12
Tags
Question

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?

Answers to

Address validation regex. What does this Rails validation mean?

Source Show
◀ Wstecz