It depends on your use case. If your application expects names to be capitalized, you should capitalize the word before validation. You can use JavaScript's `toUpperCase()` or `toLowerCase()` methods to standardize the name's capitalization.