improve validation code
add inline code docs
Add site documentation for the new feature