Skip to content

Custom Validator, disable onRender validation #876

Open
@radvansky-tomas

Description

@radvansky-tomas

Hi, could somebody advice me what I am doing wrong.
I am trying to implement custom validators. With simple example of:

$validators: {
          noBob: function(value) {
            console.log(value);
            return false;
          }
   }

Every time I open page, my field is being validated => validation message is shown.
But My expected behaviour is perform validation when I want -> so for example after submit, or onblur etc...I tried all suggested options from documentation, but this validator is ALWAYS called on render.

I tried even my own decorator and use hasError() on ng-if/show but again it did not work!

So could you advise how to implement custom validator which leaves you full control of triggering event?!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions