good Morning!

excuse my lack of knowledge , I am new to the angular-formly and I wonder how 
and where should I create a validation for did not accept the input numbers.

my code is below. Captures the value on the screen, remove the number over not 
appear on the new format screen

help


sorry the English using google translator


.run(function(formlyConfig) {
  formlyConfig.setType({
    name: 'fabio',
    extends: 'input',
    template: '<input class="form-control" id="fabio" 
ng-model="model[options.key]" ng-change="soChar()" 
ng-controller="AlterardadospesCtrl">',
    wrapper: ['bootstrapLabel', 'bootstrapHasError'],
    defaultOptions: {
      validators: {
        soChar : function ($viewValue, $modelValue) {
          var teste1 = $viewValue.replace(/[0-9]+/g,'')
        }
      }
    },
  })
})


Json

{
  "className": "col-md-5 ",
  "type": "fabio",
  "key": "Nome",
  "templateOptions": {
    "type": "text",
    "label": "Nome"
  }
},

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to