Support the ongoing development of Laravel.io →
Validation

I have this code in UserFormLaravelValidator.php

<?php namespace Authority\Service\Form\User;
use Authority\Service\Validation\AbstractLaravelValidator;
class UserFormLaravelValidator extends AbstractLaravelValidator {

protected $rules = array(
    'firstName' => 'alpha',
    'lastName' => 'alpha',
    'email' => 'required|min:4|max:32|email|unique:users,email,8', 
    'gender' => 'required'
);

protected $messages = array(
 //'email.required' => 'An email address is required.'
);
}

How to replace '8' in 'email' by current user id variable?

Last updated 3 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

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.

© 2025 Laravel.io - All rights reserved.