Add validation of callback with regex.