Skip to main content
Topic: Custom validation? (Read 2004 times) previous topic - next topic

Custom validation?

Hi, Is there any example how to use ACTION BEFORE ADD?

what i want is :

1.- MAke a query to validate if date input EXIST on Database  or IS in a RANGE:
      $db->rawQuery("UPDATE posts SET view_count=view_count + 1 WHERE id='$rec_id'");

2.- If Exists Cancel ADD and send a message

3.- If NOT Insert