Custom unique validator, and showing flash messages