I'm trying to print the laravel error through angularjs, i have done but there is problem inside the code. Script is also showing square bracket and double quote.
Validation in Controller
$this->validate($request, [
'email' => 'required|email',
]);
In AngularJs
request.error(function (error) {
$scope.mError = error.email;
$scope.loader=false;
});
In HTML
<div class="err" ng-if="mError">@{{ mError }}</div>
**OutPut**
["The email must be a valid email address."]
Can anyone guide me how can i prevent to print the double quotes and square brackets with error? I would like to appreciate. Thank You