back with new question. Here’s my table structure for groupmember table which stores the users who are added in the group with unique role.
Id int(10) NOT NULL AUTO_INCREMENT,
GroupId int(10) NOT NULL,–>ref group(ID)
UserId int(10) NOT NULL,–>ref user(ID)
UserRoleId int(10) NOT NULL–>ref userrole(ID)
I alredy used [size="5"]UNIQUE[/size] validator bt it validates each attribute.
The question is that the validation should be unique for all attribute (like composite primary key in database). E.x. values for (groupId,UserId,UerRole) = (1,1,1) IS valid for first time but again we insert it must be deny. also (1,1,2) should also be valid.
Any link forward it