FEATURE #1368: add form for creating new custom field

Currently, form is not saved, however it is validated.
This commit is contained in:
Michal Kváček
2016-01-25 18:59:31 +01:00
parent 4261362ea1
commit 3c8eb3c3f1
8 changed files with 163 additions and 8 deletions
@@ -0,0 +1,21 @@
<?php
namespace App\Http\Requests;
class NewCustomFieldRequest extends Request
{
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'name' => 'required',
'type' => 'required|exists:custom_field_types',
'minLength' => 'numeric|min:0',
'maxLength' => 'numeric|mix:0'
];
}
}