Restrict And Input Text To A Specific Language Characters In Angular.js June 09, 2024 Post a Comment i am building a form using angular.js. my form looks like: <input type="text" name="firstName" ng-model="register.firstName" placeholder="שם פרטי" required ng-pattern="pattern"></div> function ctrl($scope) { $scope.pattern = /[\u0590-\u05FF]+/g; } CopyHere is the demoSolution 2: I think Regex is the way to go. HTML5 has the new pattern attribute that you could use to validate the user input, the only problem is that you also have to take care of browsers that do not support it, with Angular you can use the ngPattern directive. This question will help you with the regex.Baca JugaAngularjs Not Allowing Square Brackets In The Url Parameter - '['Modal Close Button Not WorkingTrackballcontrols.js: This.domelement.addeventlistener Is Not A FunctionRemember that this is just the front-end validation and I recommend you to validate the user input in the back-end as well. Share You may like these postsToggle Class On Mouse Click EventJavascript String UndefinedHow To Dynamically Load The Data From Customers To A Table In Javascript Within HtmlAppend Stylesheet Link For Printing Triggered On Jquery Click() Event Post a Comment for "Restrict And Input Text To A Specific Language Characters In Angular.js"
Post a Comment for "Restrict And Input Text To A Specific Language Characters In Angular.js"