Skip to content

Commit

Permalink
unique by album id
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Jun 18, 2023
1 parent 16b5320 commit 57bf440
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Models/TrackModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ final class TrackModel extends Model
*/
protected $validationRules = [
'album_id' => 'required|numeric',
'title' => 'required|alpha_numeric_space|min_length[3]|max_length[255]|is_unique[track.title]',
'title' => 'required|alpha_numeric_space|min_length[3]|max_length[255]|is_unique[track.title,album_id,{album_id}]',
'author' => 'required|alpha_numeric_space|min_length[3]|max_length[255]',
];
}

0 comments on commit 57bf440

Please sign in to comment.