# AUR4104

## Error Message

`AUR4104: The ruleset has to be an array of serialized property rule objects`

## Description

This error occurs when attempting to hydrate (deserialize) validation rules from data that is not in the expected array format. The hydration process expects an array of rule objects.

## Common Scenarios

```typescript
// ❌ Wrong: Not an array
const invalidRules = {
  userName: 'required',
  email: 'email'
};

// ❌ Wrong: Single object instead of array
const invalidRules2 = {
  property: 'userName',
  rule: 'required'
};
```

## Solution

```typescript
// ✅ Correct: Array of rule objects
const validRules = [
  {
    property: 'userName',
    displayName: 'User Name',
    rules: [{ name: 'required' }, { name: 'minLength', value: 3 }]
  },
  {
    property: 'email', 
    displayName: 'Email',
    rules: [{ name: 'required' }, { name: 'email' }]
  }
];

validationRules.hydrateRules(validRules);
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.aurelia.io/developer-guides/error-messages/4100-to-4106/aur4104.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
