corrected validation pattern