py validation