Extend rule set for import.

This commit is contained in:
James Cole
2016-08-11 18:44:11 +02:00
parent 186b704509
commit 0aaf9a6fda
32 changed files with 349 additions and 72 deletions

View File

@@ -17,6 +17,7 @@ use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\SoftDeletes;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Watson\Validating\ValidatingTrait;
/**
* FireflyIII\Models\Budget
@@ -51,11 +52,12 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
class Budget extends Model
{
use SoftDeletes;
use SoftDeletes, ValidatingTrait;
protected $dates = ['created_at', 'updated_at', 'deleted_at', 'startdate', 'enddate'];
protected $fillable = ['user_id', 'name', 'active'];
protected $hidden = ['encrypted'];
protected $rules = ['name' => 'required|between:1,200',];
/**
* @param array $fields