Implemented regex checking of values