Support the ongoing development of Laravel.io →
Eloquent Validation Packages
Last updated 2 years ago.
0

Paste the view and controller.

Last updated 2 years ago.
0

The view is non-existent as it's getting returned as a JSON object. This is the controller method:

public function register() {
  $user = new User;
  if( $user->save() ) {
    return Response::json($user, 200);
  }
  else {
    return Response::json( $user->errors()->all(), 500 );
  }
}
Last updated 2 years ago.
0

So I finally figured it out - text inputs of type email send an empty value if they aren't formatted properly, which is why an improperly formatted email field would never even reach the email validation, as it was always coming in empty. Something to watch out for :)

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

syropian syropian Joined 4 Feb 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.