Redefine valid. Use single regex.