added regex validation support