tweaked format validator to short ciruit empty text if allowed