Skip to content

Commit

Permalink
[jts][s]: clarify that pattern constraint only applies to strings and…
Browse files Browse the repository at this point in the history
… that tests are applied to field values after casting - fixes #428.
  • Loading branch information
rufuspollock committed May 28, 2017
1 parent 15f21c0 commit 75dac04
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions content/table-schema/contents.lr
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ properties.
string
</td>
<td>
All
<code>string</code>
</td>
<td>
A regular expression that can be used to test field values. If the regular expression matches then the value is valid. Values will be treated as a string of characters. It is recommended that values of this field conform to the standard [XML Schema regular expression syntax](http://www.w3.org/TR/xmlschema-2/#regexs).
Expand All @@ -508,8 +508,7 @@ properties.

* Implementations `SHOULD` report an error if an attempt is made to evaluate a value against an unsupported constraint.
* A constraints descriptor may contain multiple constraints, in which case implementations `MUST` apply all the constraints when determining if a field value is valid.
* When testing constraints that test field values (e.g. `minimum`, `maximum`) the test should be applied after casting the field values based on their type.
* The `pattern` constraint should be applied to field values **before** casting (with the implicit assumption that before raw (pre-casting) field values are strings as in e.g. CSV).
* For all constraints that check field values such as `minimum`, `maximum`, `pattern`, the check `SHOULD` be applied after casting the field values based on their type.

# Other Properties

Expand Down

0 comments on commit 75dac04

Please sign in to comment.