The event occurs before inserting values into database and can cancel default insert statement or validate incoming values.
$conn->event->attach("beforeInsert",handlerFunc);
Parameters handlerFunc:
Availability:
Sample: