[Canonical page](<https://docs.dhtmlx.com/planning-engine/rust/api/core/project/project-options/>)
[Full documentation index](<https://docs.dhtmlx.com/planning-engine/llms.txt>)


# ProjectOptions

Options passed to [`Project::new`](<https://docs.dhtmlx.com/planning-engine/rust/api/core/project/project.md#new>). They're fixed for the lifetime of the project. There's no setter, and a clone of the project keeps the same options. `ProjectOptions::default()` gives strict validation.

## Declaration

```rust
#[derive(Clone, Debug, Default)]
pub struct ProjectOptions {
    pub validation: Validation,
}
```

## Fields

| Field | Type | Default | Description |
|---|---|---|---|
| `validation` | [`Validation`](<https://docs.dhtmlx.com/planning-engine/rust/api/core/project/validation.md>) | `Validation::Strict` | How the project validates the [`ProjectData`](<https://docs.dhtmlx.com/planning-engine/rust/api/core/data/project-data.md>) it receives: reject invalid input, or repair it and report each change. |

## Example

```rust
use plen_core::{Project, ProjectData, ProjectOptions, SolveOptions, Validation};

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let mut project = Project::new(ProjectOptions {
        validation: Validation::Repair,
    });

    let result = project.solve(Some(ProjectData::default()), &SolveOptions::default())?;
    println!("{} notes", result.notes.len());
    Ok(())
}
```

## Related

- [`Project::new`](<https://docs.dhtmlx.com/planning-engine/rust/api/core/project/project.md#new>) - the constructor that takes these options
- [`InputError`](<https://docs.dhtmlx.com/planning-engine/rust/api/core/errors/input-error.md>) - what strict validation returns for invalid input
- [`Note`](<https://docs.dhtmlx.com/planning-engine/rust/api/core/results/note.md>) - reports each fix made in repair mode
- [Accept messy input](<https://docs.dhtmlx.com/planning-engine/rust/how-to/accept-messy-input.md>) - turning on repair mode for imported data
