Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Prevent span.help-inline around signup errors #55

Merged
merged 1 commit into from

2 participants

@mikedfunk

In the login view an error looks like this:
<div class="alert alert-error">Incorrect username, email or password.</div>
In the register view it looks like this:
<div class="alert alert-error"><span class="help-inline">The email field is required.</span></div>
This was making my errors look weird.

This pull removes any default error wrappers to be more consistent with how the Login form displays error text.

@mikedfunk mikedfunk Prevent span.help-inline around signup errors
In the login view it returns a string in ```Session::get('error')``` but in register it returns an array populated from validation. In Laravel 4 this wraps with ```<span class="help-inline"></span>```. This was making my ```div.alert``` look weird.

This pull removes any default error wrappers to be more consistent with how the Login form receives error text.
501dec0
@andrew13 andrew13 merged commit 2b9955d into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 1, 2013
  1. @mikedfunk

    Prevent span.help-inline around signup errors

    mikedfunk authored
    In the login view it returns a string in ```Session::get('error')``` but in register it returns an array populated from validation. In Laravel 4 this wraps with ```<span class="help-inline"></span>```. This was making my ```div.alert``` look weird.
    
    This pull removes any default error wrappers to be more consistent with how the Login form receives error text.
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/views/generators/controller.blade.php
View
2  src/views/generators/controller.blade.php
@@ -54,7 +54,7 @@ public function {{ (! $restful) ? 'store' : 'postIndex' }}()
else
{
// Get validation errors (see Ardent package)
- $error = ${{ lcfirst(Config::get('auth.model')) }}->errors()->all();
+ $error = ${{ lcfirst(Config::get('auth.model')) }}->errors()->all(':message');
@if (! $restful)
return Redirect::action('{{ $name }}@create')
Something went wrong with that request. Please try again.