Welcome Guest, Not a member yet? Register   Sign In
Form validation: how to use is_unique(table.field1 + table.field2) ?
#1

[eluser]Genki1[/eluser]
Question:
When validating a form, can the IS_UNIQUE() rule validate that a combination of two fields is unique in the table?

Scenario:
Each user has a list of words. I want to know if the word to be inserted is unique to that user.

Table: users_words
id
word
user_id

Example:
Is the word "happy" unique to user ID #1?

Of course, I can write this simple validation routine, but it'd be nice if the functionality is already built-in.



Messages In This Thread
Form validation: how to use is_unique(table.field1 + table.field2) ? - by El Forum - 04-30-2012, 05:00 PM



Theme © iAndrew 2016 - Forum software by © MyBB