Added example code for custom validation and callbacks