By using the rule editor, the validation script can be added for individual components as well. You can open the rule editor for the component on which you want to apply the script, or you can also select the required component from the form model tree available in the rule editor. When the submit button is clicked, it runs the validations on every component. If you've written a custom validation script, then that script will also get called.
Client Libs can be added to any number of forms and allow you to create standard libraries of features and functionality across your forms. Things like email, web, phone number validations can be added using the rule editor to make a call to your standard functions.