Magic formula validation