trying new validation, but runs every time on page due to function running every time.