javascript - ng pattern which allows alphnumeric but without spaces for input tag in angular js -
using pattern like "/ [a-zA-Z0-9] [^ \ s] /" and "/ \ S /" But no one is working, can you give any solution for this NG pattern for the input tag and which allows the olly alphanumeric but does not allow spaces in the input field is. "
Try the following patterns: / ^ \ s * \ w * \ s * $ /
& lt; script & gt; angular module ('text input' example, []). Controller ('example controller', ['$ radius', function ($ radius) {$ scope. Text = 'guest'; $ scope.word = / ^ \ s * \ w * \ s * $ /;}]); & lt; / script & gt; & lt; form name = "myForm" ng-controller = "ExampleController" & gt; Single word: & lt; input type = "text" name = "input" ng-model = "text" ng-max lang = "5" ng-pattern = "word" required ng-trim = " "& Gt;
Comments
Post a Comment