validation and flash attributes