# valid_scope_name · FT4 Rell API · Chromia Docs (concept)

> function valid_ scope_ name(scope: text): text Ensures that the scope is valid, also trimming leading and trailing whitespace. Throws if scope is not valid

Source: https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.auth/valid_scope_name/

FUNCTION

# valid\_scope\_name

```signature
function valid_scope_name(scope: text): text
```

[Source](https://gitlab.com/chromaway/ft4-lib/-/blob/development/rell/src/lib/ft4/core/auth/module.rell#lines-300)

Ensures that the scope is valid, also trimming leading and trailing whitespace.

Throws if `scope` is not valid

**Parameters**

* **scope** — The `scope` parameter of the auth handler to trim and check

**Returns**

the valid scope name, trimmed from leading and trailing whitespace

**See Also**

* [require\_valid\_scope\_name](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.auth/require_valid_scope_name/) — for the rules on scope validation

[View this page on docs.chromia.com](https://docs.chromia.com/pages/ft4-rell/-f-t4%20-library/lib.ft4.core.auth/valid_scope_name.html)Generated API reference, mirrored from the live docs
