Complete ref validation example