Open kuba97531 opened 14 years ago
http://github.com/ZenCocoon/i18n_multi_locales_validations
on this source, you can do this kind of validations.
hope this helps.
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
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!