> For the complete documentation index, see [llms.txt](https://block3d.gitbook.io/block3d/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://block3d.gitbook.io/block3d/utils/checksimplerules.md).

# checkSimpleRules

Returns two Rule arrays, simplePassing for the rules the user meets the criteria for, and simpleFailing for the rules the user doesn't meet the criteria for.

```typescript
/* src/utils/checkSimpleRules */

import { Rule, Block3dConfig } from "../types/block3d";

/**
 * @param address is the currently connected user address
 * @return `passing` is a Rule[] containing all simple rule checks the user passed
 * @return `failing` is a Rule[] containing all simple rule checks the user failed
 */
export async function checkSimpleRules(
  address: string,
  block3dConfig: Block3dConfig,
) {
  let passing: Rule[] = [];
  let failing: Rule[] = [];

  let simpleRules: Rule[] = block3dConfig.rules.filter(
    (rule) => rule.type === "simple",
  );

  simpleRules.forEach((rule) => {
    rule.addresses?.includes(address) ? passing.push(rule) : failing.push(rule);
  });

  return { simplePassing: passing, simpleFailing: failing };
}
```
