Permalink
Switch branches/tags
Find file
Fetching contributors…
Cannot retrieve contributors at this time
135 lines (123 sloc) 6.18 KB
en:
remarkable:
mongo_mapper:
describe:
each: "%{key} is %{value}"
prepend: "when "
connector: " and "
expectations:
allow_nil: "%{subject_name} to %{not}allow nil values for %{attribute}"
allow_blank: "%{subject_name} to %{not}allow blank values for %{attribute}"
optionals:
allow_nil:
positive: "allowing nil values"
negative: "not allowing nil values"
allow_blank:
positive: "allowing blank values"
negative: "not allowing blank values"
allow_values_for:
description: "allow %{in} as values for %{attributes}"
expectations:
is_valid: "%{subject_name} to be valid when %{attribute} is set to %{value}"
association:
many: have many
belongs_to: belong to
description: "%{type} %{associations}"
expectations:
association_exists: "%{subject_name} records %{type} %{association}, but the association does not exist"
type_matches: "%{subject_name} records %{type} %{association}, got %{subject_name} records %{actual_type} %{association}"
klass_exists: "%{subject_name} records %{type} %{association}, but the association class does not exist"
options_match: "%{subject_name} records %{type} %{association} with options %{options}, got %{actual}"
have_key:
description: "have key(s) %{attributes} with type %{type}"
expectations:
has_key: "%{subject_name} to have key named %{attribute} with type %{type}"
validate_acceptance_of:
description: "require %{attributes} to be accepted"
expectations:
requires_acceptance: "%{subject_name} to be invalid if %{attribute} is not accepted"
accept_is_valid: "%{subject_name} to be valid when %{attribute} is accepted with value %{accept}"
optionals:
accept:
positive: "with value %{inspect}"
validate_associated:
description: "require associated %{associations} to be valid"
expectations:
is_valid: "%{subject_name} to be invalid when %{association} is invalid"
validate_confirmation_of:
description: "require %{attributes} to be confirmed"
expectations:
responds_to_confirmation: "%{subject_name} instance responds to %{attribute}_confirmation"
confirms: "%{subject_name} to be valid only when %{attribute} is confirmed"
validate_exclusion_of:
description: "ensure exclusion of %{attributes} in %{in}"
expectations:
is_valid: "%{subject_name} to be valid when %{attribute} is set to %{value}"
is_invalid: "%{subject_name} to be invalid when %{attribute} is set to %{value}"
validate_inclusion_of:
description: "ensure inclusion of %{attributes} in %{in}"
expectations:
is_valid: "%{subject_name} to be valid when %{attribute} is set to %{value}"
is_invalid: "%{subject_name} to be invalid when %{attribute} is set to %{value}"
validate_length_of:
description: "ensure length of %{attributes}"
expectations:
less_than_min_length: "%{subject_name} to be invalid when %{attribute} length is less than %{minimum} characters"
exactly_min_length: "%{subject_name} to be valid when %{attribute} length is %{minimum} characters"
more_than_max_length: "%{subject_name} to be invalid when %{attribute} length is more than %{maximum} characters"
exactly_max_length: "%{subject_name} to be valid when %{attribute} length is %{maximum} characters"
optionals:
within:
positive: "is within %{inspect} characters"
maximum:
positive: "is maximum %{inspect} characters"
minimum:
positive: "is minimum %{inspect} characters"
is:
positive: "is equal to %{inspect} characters"
with_kind_of:
positive: "with kind of %{value}"
validate_numericality_of:
description: "ensure numericality of %{attributes}"
expectations:
only_numeric_values: "%{subject_name} to allow only numeric values for %{attribute}"
only_integer: "%{subject_name} to %{not}allow only integer values for %{attribute}"
only_even: "%{subject_name} to allow only even values for %{attribute}"
only_odd: "%{subject_name} to allow only odd values for %{attribute}"
equals_to: "%{subject_name} to be valid only when %{attribute} is equal to %{count}"
more_than_maximum: "%{subject_name} to be invalid when %{attribute} is greater than %{count}"
less_than_minimum: "%{subject_name} to be invalid when %{attribute} is less than %{count}"
optionals:
only_integer:
positive: "allowing only integer values"
odd:
positive: "allowing only odd values"
even:
positive: "allowing only even values"
equal_to:
positive: "is equal to %{inspect}"
less_than:
positive: "is less than %{inspect}"
greater_than:
positive: "is greater than %{inspect}"
less_than_or_equal_to:
positive: "is less than or equal to %{inspect}"
greater_than_or_equal_to:
positive: "is greater than or equal to %{inspect}"
validate_presence_of:
description: "require %{attributes} to be set"
expectations:
allow_nil: "%{subject_name} to require %{attribute} to be set"
validate_uniqueness_of:
description: "require unique values for %{attributes}"
expectations:
responds_to_scope: "%{subject_name} instance responds to %{method}"
is_unique: "%{subject_name} to require unique values for %{attribute}"
case_sensitive: "%{subject_name} to %{not}be case sensitive on %{attribute} validation"
valid_with_new_scope: "%{subject_name} to be valid when %{attribute} scope (%{method}) change"
optionals:
scope:
positive: "scoped to %{sentence}"
case_sensitive:
positive: "case sensitive"
negative: "case insensitive"