Fixed before validation callback declaration

Fix #391