Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Username not accepting "." #546

Open
webmastervinay opened this issue Aug 17, 2015 · 1 comment
Open

Username not accepting "." #546

webmastervinay opened this issue Aug 17, 2015 · 1 comment

Comments

@webmastervinay
Copy link

Hello,

I was trying to create a new user with username included ".", It gives error as below
image

Can you please fix this bug?

@stefanzweifel
Copy link

This issue probably accours, because confide doesn't allow "." in a username by default.

You can simple create your own validation class and bind it to the IoC-Container. How-to-Guide.

You can override the rules by simply extending the original UserValidator Class like so:

<?php

use Zizaco\Confide\UserValidator;
use Zizaco\Confide\UserValidatorInterface;

class CustomConfideValidator extends UserValidator
{

    public $rules = [
        'create' => [
            'username' => 'string',
            'email'    => 'required|email',
            'password' => 'required|min:4',
        ],
        'update' => [
            'username' => 'string',
            'email'    => 'required|email',
            'password' => 'required|min:4',
        ]
    ];

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants