silverbux / laravel-angular-admin

Laravel + Angularjs + Bootstrap + AdminLTE binded by Gulp workflow Admin Dashboard Boilerplate / Starter.
http://silverbux.github.io/laravel-angular-admin/
MIT License
924 stars 414 forks source link

login error #58

Closed cssailing closed 7 years ago

cssailing commented 7 years ago

if input wrong password, /api/auth/login callback message {"message":"422 Unprocessable Entity","errors":{"password":["The password must be at least 8 characters."]},"status_code":422}

the console log show error Failed to load resource: the server responded with a status of 422 (Unprocessable Entity) vendor-2dd0d3c10a.js:5 TypeError: Cannot read property '0' of undefined at e.value (app-c915cb31e1.js:2) at a (vendor-2dd0d3c10a.js:5) at vendor-2dd0d3c10a.js:5 at h.$eval (vendor-2dd0d3c10a.js:6) at h.$digest (vendor-2dd0d3c10a.js:6) at h.$apply (vendor-2dd0d3c10a.js:6) at l (vendor-2dd0d3c10a.js:5) at $ (vendor-2dd0d3c10a.js:5) at XMLHttpRequest.S.onload (vendor-2dd0d3c10a.js:5)(anonymous function) @ vendor-2dd0d3c10a.js:5

the login page can not show the error message

thomasmktong commented 7 years ago

Hi @cssailing, please try the above fix, thanks.

silverbux commented 7 years ago

@cssailing thanks, also check this commit https://github.com/silverbux/laravel-angular-admin/commit/58d12a817b57b7e3b91bbb613c8ed9eef1aadc93