Restrict And Input Text To A Specific Language Characters In Angular.js March 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 JugaFullpage Js Animation On SectionReact Native Change State With Unexpected LoggingReturning A $promise From Two Resource Calls In Angularjs To Delay Route ChangeRemember 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 postsHow To Shuffle Numbers With Textarea In JavascriptIntegrate Two Requests Into One JavascriptHighcharts Csv Data Loading And Parse Into Separate Array And JsonWhat Is The Alternative Of Formdata In Ios? 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"