ENH: add validate as a param to join (#46622)
- [ ] closes #46622

- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature

- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [x] Added an entry in the latest `doc/source/whatsnew/v1.5.0.rst` file if fixing a bug or adding a new feature.

Does it matter for the change to be merged if one code check fails? The failure seems to come from a file I never touched, while the previous two commits were able to pass all checks. > Does it matter for the change to be merged if one code check fails?

This was a known failure affecting all builds. Just waiting on if other maintainers would like to review > > Does it matter for the change to be merged if one code check fails?
> 
> This was a known failure affecting all builds. Just waiting on if other maintainers would like to review

Sure. Thank you! looks good, it might be worth adding something to https://pandas.pydata.org/pandas-docs/dev/user_guide/merging.html?highlight=join#joining-on-index (there is a lot of sections, so this is a *maybe*). thanks @gaotian98 very nice!