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

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -