Laravel - Blade Templates - Validation Errors

The @error directive may be used to quickly check if validation error messages exist for a given attribute. Within an @error directive, you may echo the $message variable to display the error message:

    
    
    
    
    
    
    
    @error('title')
        
{{ $message }}
@enderror

Since the @error directive compiles to an "if" statement, you may use the @else directive to render content when there is not an error for an attribute:

    
    
    
    
    
    
	

You may pass the name of a specific error bag as the second parameter to the @error directive to retrieve validation error messages on pages containing multiple forms:

    
    
    
    
    
    
    
    @error('email', 'login')
        
{{ $message }}
@enderror