Welcome Guest, Not a member yet? Register   Sign In
Language file in rule group error?
#1

Is there a way to be able to use a lang() in a rule group to display errors?

In my Config/Validation.php
PHP Code:
public $clientRegistration = [
        'first_name' => ['label' => 'First Name''rules' => 'trim|required|min_length[2]|clients_name_check'],
        'last_name' => ['label' => 'Last Name''rules' => 'trim|required|min_length[2]|clients_name_check'],
        'birth_date' => ['label' => 'Birth Date''rules' => 'trim|required|check_date_format''errors' => ['check_date_format' => lang('Misc.field_not_formatted_correctly')]],
    ]; 

I am getting an error in my IDE:

"expression is not allowed as field default value"

Maybe I am missing on how to do this.

Thank you in advanced.
Reply


Messages In This Thread
Language file in rule group error? - by sevmusic - 12-20-2021, 02:46 PM
RE: Language file in rule group error? - by stopz - 12-20-2021, 03:18 PM



Theme © iAndrew 2016 - Forum software by © MyBB