Welcome Guest, Not a member yet? Register   Sign In
is_unique in Form Validation on UPDATE

(06-06-2016, 04:29 AM)edoramedia Wrote: We have a table that has a section called "slug".
Obviously slug needs to be unique and therefore when we insert we use "is_unique[article.slug]" which works perfectly fine.

However the problem is that when we want to edit that slug we need it to again check if is_unique BUT not compare it with itself.

Is there a right way around this, because at the moment when we submit the update and slug is not changed it considers it "used" and therefore passes an error.


Why edit the slug? My opinion, just update the title without change the slug. Updating the slug cause "404 not found" when bot re-crawling your web page or some visitor had bookmark your page URL.
KeepĀ calm.

Messages In This Thread
RE: is_unique in Form Validation on UPDATE - by arma7x - 06-06-2016, 05:37 AM

Theme © iAndrew 2016 - Forum software by © MyBB