Added regex for input check