You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 18, 2019. It is now read-only.
I just got Translatable working with Ardent with the help of your gist but I'm facing an issue.
To use your example with Country, both Country and CountryTranslation would extend Ardent. I would like to validate the name of the country (say, max 100 characters). For that I would configure the validator in CountryTranslation. I'm able to save translations when the name is valid. So far so good.
If I do something like this:
$country->translate('en')->name = 'a very long name with more than 100 chars';
$country->save();
Then CountryTranslation doesn't save (which is right, since it's not valid). However, I'm unable to get the error messages. If I do $country->errors()->all(), the list of errors is empty. Also, $country->validate() returns true, which is weird.
Do you have any idea about this? That's probably not an issue with Translatable itself, just the way it integrates with Ardent.
The text was updated successfully, but these errors were encountered:
I am facing the same problem, is there already any solution ?
When the name is not valid in the translation table, a record is still created in the country table. Shouldn't that be stopped ? When there is an error no record should be created...
It's also on Packagist, but use it on your own risk 😃. I've done some preliminary testing and everything seems to play pretty nice with each other. Using this base class also fixes #12.
Hi there
I just got Translatable working with Ardent with the help of your gist but I'm facing an issue.
To use your example with Country, both Country and CountryTranslation would extend Ardent. I would like to validate the name of the country (say, max 100 characters). For that I would configure the validator in CountryTranslation. I'm able to save translations when the name is valid. So far so good.
If I do something like this:
Then CountryTranslation doesn't save (which is right, since it's not valid). However, I'm unable to get the error messages. If I do
$country->errors()->all()
, the list of errors is empty. Also,$country->validate()
returns true, which is weird.Do you have any idea about this? That's probably not an issue with Translatable itself, just the way it integrates with Ardent.
The text was updated successfully, but these errors were encountered: