Merge branch 'new-ui' of https://github.com/JhumanJ/OpnForm into new-ui
This commit is contained in:
@@ -9,6 +9,7 @@ use Illuminate\Contracts\Auth\MustVerifyEmail;
|
||||
use Illuminate\Foundation\Auth\RegistersUsers;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class RegisterController extends Controller
|
||||
{
|
||||
@@ -52,7 +53,10 @@ class RegisterController extends Controller
|
||||
'name' => 'required|max:255',
|
||||
'email' => 'required|email:filter|max:255|unique:users',
|
||||
'password' => 'required|min:6|confirmed',
|
||||
'hear_about_us' => 'required|string'
|
||||
'hear_about_us' => 'required|string',
|
||||
'agree_terms' => ['required',Rule::in([true])]
|
||||
],[
|
||||
'agree_terms' => 'Please agree with the terms and conditions.'
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,8 @@ class FormResource extends JsonResource
|
||||
'visibility' => $this->visibility,
|
||||
'notification_emails' => $this->notification_emails,
|
||||
'slack_webhook_url' => $this->slack_webhook_url,
|
||||
'removed_properties' => $this->removed_properties
|
||||
'removed_properties' => $this->removed_properties,
|
||||
'last_edited_human' => $this->updated_at->diffForHumans()
|
||||
] : [];
|
||||
|
||||
$baseData = $this->getFilteredFormData(parent::toArray($request), $this->userIsFormOwner());
|
||||
|
||||
Reference in New Issue
Block a user