# Schema: attributes restriction not supported in |-expressions?

**URL:** <https://discuss.prosemirror.net/t/schema-attributes-restriction-not-supported-in-expressions/894>\
**Category:** Uncategorized\
**Created:** [July 27, 2017, 7:24pm UTC](https://discuss.prosemirror.net/t/schema-attributes-restriction-not-supported-in-expressions/894 "2017-07-27T19:24:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sacha](https://discuss.prosemirror.net/letter_avatar_proxy/v4/letter/s/c0e974/32.png) [@sacha](https://discuss.prosemirror.net/u/sacha)\
**Post date:** [July 27, 2017, 7:24pm UTC](https://discuss.prosemirror.net/t/schema-attributes-restriction-not-supported-in-expressions/894/1 "2017-07-27T19:24:09Z")

</div>

This works:

```javascript
nodes.doc.content = '(block | whatever)+'

```

while this:

```javascript
nodes.doc.content = '(block | whatever[level=1])+'

```

gives you: `SyntaxError: Invalid content expression`

Is this by design as of today?

---

<div class="post-metadata">

**Author:** ![marijn](https://discuss.prosemirror.net/user_avatar/discuss.prosemirror.net/marijn/32/15_2.png) [@marijn](https://discuss.prosemirror.net/u/marijn)\
**Post date:** [July 28, 2017, 11:14am UTC](https://discuss.prosemirror.net/t/schema-attributes-restriction-not-supported-in-expressions/894/2 "2017-07-28T11:14:32Z")

</div>

Attribute constraints should go outside of the parentheses, which is bad, but they are [going away entirely](https://discuss.prosemirror.net/t/rfc-deprecating-prosemirror-schema-table-and-attribute-constraints-in-schemas/864/6) so please don’t start relying on them.

---

<div class="post-metadata">

**Author:** ![sacha](https://discuss.prosemirror.net/letter_avatar_proxy/v4/letter/s/c0e974/32.png) [@sacha](https://discuss.prosemirror.net/u/sacha)\
**Post date:** [July 28, 2017, 12:50pm UTC](https://discuss.prosemirror.net/t/schema-attributes-restriction-not-supported-in-expressions/894/3 "2017-07-28T12:50:55Z")

</div>

Ok, thanks.
