Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

javascript regex only letters and spaces

//regex expression:
var reg_name_lastname = /^[a-zA-Zs]*$/;

//Validation to the user_name input field
if(!reg_name_lastname.test($('#user_name').val())){ //
    alert("Correct your First Name: only letters and spaces.");
    valid = false;
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: copy text to clipboard javascript 
Javascript :: wait for element javascript 
Javascript :: node load string from file 
Javascript :: 419 unknown status ajax laravel 
Javascript :: how do i backspace from javascript calculator 
Javascript :: javascript location href target _blank 
Javascript :: js remove trailing slash 
Javascript :: convert number to comma separated format javascript 
Javascript :: regex to get items between quotes 
Javascript :: send a file ajax 
Javascript :: run react native app in production mode 
Javascript :: how express serve public folder 
Javascript :: english number to bangla javascript 
Javascript :: how to convert seconds into days hours seconds js 
Javascript :: javascript disable scrolling on body 
Javascript :: submit form through jquery by id 
Javascript :: Could not resolve dependency error peer react@"^16.8.0 || ^17.0.0" from @material-ui/core@4.12.4 
Javascript :: nodejs get file size 
Javascript :: angular limit string length 
Javascript :: laravel ajax post request 
Javascript :: NullInjectorError: No provider for HttpClient! 
Javascript :: how to drawImage on center of canvas 
Javascript :: random index js 
Javascript :: remove last character from string js 
Javascript :: find intersection of multiple arrays in javascript 
Javascript :: get text inside element javascript 
Javascript :: hide show div using jquery 
Javascript :: javascript detect enter press on input 
Javascript :: jquery toggle attribute disabled 
Javascript :: how to detect safari browser in javascript 
ADD CONTENT
Topic
Content
Source link
Name
3+6 =