Fix regex validation