Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

LocationAttibute.cs 351 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
  1. namespace LuisActions.Samples
  2. {
  3. using System.ComponentModel.DataAnnotations;
  4. public class LocationAttribute : ValidationAttribute
  5. {
  6. public override bool IsValid(object value)
  7. {
  8. // TODO: Actually validate location using Bing
  9. return value == null || ((string)value).Length >= 3;
  10. }
  11. }
  12. }
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...