Add validation to check translations amount on updates

In order to not allow users to remove all persited
translations from any resource. A few exceptions were
added:

* Does not apply to globalizable models without
   translatable attributes required
* Make a copy of main model error on current translations to be more realistic
This commit is contained in:
Senén Rodero Rodríguez
2019-06-07 16:45:14 +02:00
parent 12d20b481d
commit d3422acbb7
4 changed files with 55 additions and 0 deletions

View File

@@ -448,6 +448,7 @@ en:
valuation:
cannot_comment_valuation: "You cannot comment a valuation"
messages:
translations_too_short: Is mandatory to provide one translation at least
record_invalid: "Validation failed: %{errors}"
another_poll_active: There is another poll active for the given period
restrict_dependent_destroy: