IsSupportedValidationFormat checks if the validation format is supported by goa.
(vf ValidationFormat)
| 997 | |
| 998 | // IsSupportedValidationFormat checks if the validation format is supported by goa. |
| 999 | func (*AttributeExpr) IsSupportedValidationFormat(vf ValidationFormat) bool { |
| 1000 | switch vf { |
| 1001 | case FormatDate: |
| 1002 | return true |
| 1003 | case FormatDateTime: |
| 1004 | return true |
| 1005 | case FormatUUID: |
| 1006 | return true |
| 1007 | case FormatEmail: |
| 1008 | return true |
| 1009 | case FormatHostname: |
| 1010 | return true |
| 1011 | case FormatIPv4: |
| 1012 | return true |
| 1013 | case FormatIPv6: |
| 1014 | return true |
| 1015 | case FormatIP: |
| 1016 | return true |
| 1017 | case FormatURI: |
| 1018 | return true |
| 1019 | case FormatMAC: |
| 1020 | return true |
| 1021 | case FormatCIDR: |
| 1022 | return true |
| 1023 | case FormatRegexp: |
| 1024 | return true |
| 1025 | case FormatJSON: |
| 1026 | return true |
| 1027 | case FormatRFC1123: |
| 1028 | return true |
| 1029 | } |
| 1030 | return false |
| 1031 | } |