I figured out how to do it using the code that removes redundant from data like confirmation fields.
public $autoPurgeRedundantAttributes = true;
function __construct() {
parent::__construct();
$this->purgeFilters[] = function($key) {
$purge = array('tempData', 'myAttribute');
return ! in_array($key, $purge);
};
}
You need to enable $autoPurgeRedundantAttributes
or the filters won't be called. Then you add a closure to the $purgeFilters
array which returns false if the provided attribute should be removed. ("days" in this case)
Then you just need to make sure to manually set the field you want validated
$this->attributes['days'] = $value;
Edit: This is in the official docs now. I replaced my code above with theirs.