0

I am developing an angular js app. with a asp.net web api server. The validation is model based like:

  [Required]
  public int ID { get; set; } 

  [StringLength(50, MinimumLength = 2)]
  public string name { get; set; }

  [Range(15, 100)]
  public int age { get; set; }

I would like to implement the same validation rules on the clientside ie in my angular code. Is there an existing directive that can do this?

1

2 Answers 2

0

You can have a look at these post https://docs.angularjs.org/api/ng/directive/input

Sign up to request clarification or add additional context in comments.

Comments

0

Take a look at this project - https://github.com/alisabzevari/ngval

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.