moves validation error message
This commit is contained in:
@@ -43,7 +43,7 @@ class Poll < ActiveRecord::Base
|
|||||||
|
|
||||||
def date_range
|
def date_range
|
||||||
unless starts_at.present? && ends_at.present? && starts_at <= ends_at
|
unless starts_at.present? && ends_at.present? && starts_at <= ends_at
|
||||||
errors.add(:starts_at, I18n.t('activerecord.errors.invalid_date_range'))
|
errors.add(:starts_at, I18n.t('errors.messages.invalid_date_range'))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -82,7 +82,6 @@ en:
|
|||||||
description: "Description"
|
description: "Description"
|
||||||
external_url: "Link to additional documentation"
|
external_url: "Link to additional documentation"
|
||||||
errors:
|
errors:
|
||||||
invalid_date_range: "Invalid date range"
|
|
||||||
models:
|
models:
|
||||||
user:
|
user:
|
||||||
attributes:
|
attributes:
|
||||||
|
|||||||
@@ -82,7 +82,6 @@ es:
|
|||||||
description: "Descripción"
|
description: "Descripción"
|
||||||
external_url: "Enlace a documentación adicional"
|
external_url: "Enlace a documentación adicional"
|
||||||
errors:
|
errors:
|
||||||
invalid_date_range: "El rango de fechas no es válido"
|
|
||||||
models:
|
models:
|
||||||
user:
|
user:
|
||||||
attributes:
|
attributes:
|
||||||
|
|||||||
@@ -139,6 +139,7 @@ en:
|
|||||||
errors:
|
errors:
|
||||||
messages:
|
messages:
|
||||||
user_not_found: User not found
|
user_not_found: User not found
|
||||||
|
invalid_date_range: "Invalid date range"
|
||||||
form:
|
form:
|
||||||
accept_terms: I agree to the %{policy} and the %{conditions}
|
accept_terms: I agree to the %{policy} and the %{conditions}
|
||||||
accept_terms_title: I agree to the Privacy Policy and the Terms and conditions of use
|
accept_terms_title: I agree to the Privacy Policy and the Terms and conditions of use
|
||||||
|
|||||||
@@ -139,6 +139,7 @@ es:
|
|||||||
errors:
|
errors:
|
||||||
messages:
|
messages:
|
||||||
user_not_found: No se encontró el usuario
|
user_not_found: No se encontró el usuario
|
||||||
|
invalid_date_range: "El rango de fechas no es válido"
|
||||||
form:
|
form:
|
||||||
accept_terms: Acepto la %{policy} y las %{conditions}
|
accept_terms: Acepto la %{policy} y las %{conditions}
|
||||||
accept_terms_title: Acepto la Política de privacidad y las Condiciones de uso
|
accept_terms_title: Acepto la Política de privacidad y las Condiciones de uso
|
||||||
|
|||||||
Reference in New Issue
Block a user