php - Showing validation errors to view -


i want show validation errors users in comma seperated

i.e.,

the username field required, password field required

so far can able send validation error messages view this

$validation->messages() 

but thing can't able

@if(session::has('message')) <p class="alert">{{ session::get('message') }}</p> @endif 

or

{{ $errors->first('username', '<div class="error">:message</div>') }} 

the thing can pass messages normal text.

so, how can pass validation messages view plain text (rather array or object)

update :

i mean can works in controller , not in view

in controller:

return implode(',',$validation->errors()->all()); 

Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

[C++][SFML 2.2] Strange Performance Issues - Moving Mouse Lowers CPU Usage -

ios - Possible to get UIButton sizeThatFits to work? -