1. 20 Jul, 2018 1 commit
  2. 05 Jul, 2018 1 commit
  3. 03 Jul, 2018 1 commit
  4. 29 Jun, 2018 1 commit
    • Marc Santiago's avatar
      (Enhancement) Validator: Validating contents of []int · 2a4a71cf
      Marc Santiago authored
      Adding a new type to enable the ability to validate what's inside of an
      int slice.  This is important for structured API documentation, when the
      items in the slice should be known integers. I didn't implement the other
      slice types as I don't have a use case for them, but it should be easy
      enough to extend. This is not a breaking change.
      2a4a71cf
  5. 28 Jun, 2018 1 commit
    • Marc Santiago's avatar
      Validator: Adding more concrete base64 validation · 9b869c86
      Marc Santiago authored
      The current base64 validator makes a few assumptions about the nature
      of the base 64 string as a result of using regex.
      By using Go's build in base64 lib we circumvent the regex as well as
      adding full functionally to validate both standard base64 strings
      and raw base64 strings.
      This is an additive string, which allows for full backwards capabilities.
      9b869c86
  6. 20 Jun, 2018 1 commit
    • ferhat elmas's avatar
      some simplications · ffd6ff72
      ferhat elmas authored
      uses newer functions not available in old go versions
      but I guess support should be rechecked.
      ffd6ff72
  7. 13 Apr, 2018 1 commit
  8. 09 Apr, 2018 1 commit
  9. 07 Apr, 2018 1 commit
  10. 19 Mar, 2018 1 commit
  11. 15 Mar, 2018 1 commit
  12. 13 Mar, 2018 4 commits
  13. 16 Feb, 2018 1 commit
  14. 12 Jan, 2018 3 commits
  15. 23 Nov, 2017 1 commit
  16. 15 Nov, 2017 1 commit
  17. 12 Nov, 2017 1 commit
  18. 11 Nov, 2017 1 commit
  19. 09 Nov, 2017 1 commit
  20. 05 Nov, 2017 1 commit
  21. 01 Nov, 2017 1 commit
  22. 25 Oct, 2017 1 commit
    • Maciek Borzecki's avatar
      validator: proper handling of JSON fields with ignore tag · 68ef7dd0
      Maciek Borzecki authored
      The validator code will correctly use JSON field names if those are defined for
      given type. However, it is possible to set JSON tags with "-" ignore setting in
      order to prevent the field from being (de-)serialized to/from JSON. In this
      case, the validation error message contain '-' as field name (as it was defined
      in JSON tag) instead of the struct field name.
      
      Take this type as an example:
      
      type Foo struct {
           Foo string `json:"-" valid:"-,required"`
      }
      
      The error message will contain: '-: non zero value required', while one would
      expect only 'Foo: non zero..'
      Signed-off-by: 's avatarMaciek Borzecki <maciek.borzecki@gmail.com>
      68ef7dd0
  23. 29 Sep, 2017 2 commits
    • Sergio Salvatore's avatar
      Expose the Validator that Failed in the Error · 0875f636
      Sergio Salvatore authored
      In some cases it is convenient to have access to the validator that failed
      the validation in the error response.  This fix exposes the validator that was
      used in the error so it can be used downstream.
      
      My case has it returned in a JSON response so that errors can be shown in a
      user interface more conveniently:
      
      ```
      {
        "error": {
          "code": "validation",
          "message": "Field validation failed",
          "details": {
            "pageAddress": {
              "code": "url",
              "key": "pageAddress",
              "message": "name: non-url does not validate as url"
            }
          }
        }
      }
      ```
      
      This commit allows the "code": "url" part to be available to the error handler.
      0875f636
    • Sergio Salvatore's avatar
      41c6b2ea
  24. 21 Sep, 2017 1 commit
  25. 27 Jul, 2017 1 commit
  26. 26 May, 2017 1 commit
  27. 13 May, 2017 1 commit
  28. 12 May, 2017 1 commit
  29. 07 May, 2017 3 commits
  30. 29 Apr, 2017 1 commit
  31. 25 Apr, 2017 2 commits