Template directive: error

The @error directive is an helper directive for the error() function. It takes the same argument as the function. An example is shown below
error
Example: error
  <form method="post">
  
    @csrf
    
    <div> @error('username') </div>
    <input type="text" name="username" value="@error.username" >
    
    <div> @error('password') </div>
    <input type="password" name="pass" value="@error.pass">

    <button @btn('login')></button> 
    
  </form>
                  
From the sample above, the error of each form field will be returned if it exists. It is suggested to visit the Form::errors() documentation to learn more about how this directive can be applied.