joshmh / globalize2

The second incarnation of Globalize for Rails
http://www.globalize-rails.org/
MIT License
364 stars 57 forks source link

Translated models - validation works only for current locale #17

Open kuba97531 opened 14 years ago

kuba97531 commented 14 years ago

validations only work for the current locale, but I think it should work for all locales

in model

translates :description validates_length_of :description, :maximum=>6, :allow_nil => true

usecase

I18n.locale = 'de' record.description = "this string is too long for this field" record.save # fails I18n.locale = 'en' record.save # doesn't fail, but should!

bernardeli commented 14 years ago

http://github.com/ZenCocoon/i18n_multi_locales_validations

on this source, you can do this kind of validations.

hope this helps.

phlegx commented 13 years ago

Hi all!

Why not add batch translations with validations to globalize2. i18n_multi_locales_validations and i18n_multi_locales_form are nice approaches and globalize2 gets a all in one status for i18n model translations.

Cheers