Working validation outside wp

Working validation outside wp. example