Unique validation error on update
unique validation works during create but validation errors out during update.
I have two tables users and applicants the applicants belongsTo users and users hasOne applicants.
I have this form field for ApplicantResource's form
Forms\Components\TextInput::make('email')
->required()
->email()
->unique('users',ignoreRecord:true),
This works during creation of applicant in which i have. But during edit it errors out like this
Connection: mysql, SQL: select count(*) as aggregate from users where email = error@gmail.com and applicants.id <> 9)
here applicant_profiles.id = 9 i believe this is incorrect. applicants should be a table not a field.
I want to create and update user from applicant's form to.
I have two tables users and applicants the applicants belongsTo users and users hasOne applicants.
I have this form field for ApplicantResource's form
Forms\Components\TextInput::make('email')
->required()
->email()
->unique('users',ignoreRecord:true),
This works during creation of applicant in which i have. But during edit it errors out like this
Connection: mysql, SQL: select count(*) as aggregate from users where email = error@gmail.com and applicants.id <> 9)
here applicant_profiles.id = 9 i believe this is incorrect. applicants should be a table not a field.
I want to create and update user from applicant's form to.