add alert message and validation