Use `settings::resolve_preview` for project validation (#18447)
## Summary
The affected code was manually implementing part of the full logic which
was already available in `settings::resolve_preview` so this PR just
makes the project validation code use this function instead.
## Test Plan
Existing test coverage.