Restrict And Input Text To A Specific Language Characters In Angular.js January 21, 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 JugaIn My Service-factory I Lookup Up A Large Dataset - I Want To Persist It And Check For Its Existence To Avoid Calling It AgainExtend Angular Controllers Using Controlleras Syntax & Prototypical InheritanceDelete Function Not Working With AngularjsRemember 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 postsCan Typescript Infer That An Argument Has Been Validated?Bootstrap 4 Close Modal, Backdrop Doesn't DisappearHow To Implement A Scrollspy With ReactHow To Set Custom Settings For Worksheet Using Excel Javascript Api? 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"