Skip to content
Advertisement

Jquery Validation: allow only alphabets and spaces

My validation accepts only alphabets. I want allow spaces as well.

JavaScript

What change needs to be done here?

Advertisement

Answer

Instead of the below regex:

JavaScript

Use this:

JavaScript

This will also take the space.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement