Added regex validation and alerts