Factor out project validation, re-order warning and error messages.