# EV/validate > Validate an EV object --- ## Description Validate the properties of an EV object to ensure that they meet the required conditions. If all the conditions are satisfied, the function returns an EV object with `valid = true`. If not, corresponding error message is raised. ## Syntax ```matlab ev = validate(ev) ev = ev.validate() ``` ## Input Arguments | Name | Type | Description | |------|------|--------------| | `ev` | *EV object* | EV object to be validated | ## Output Arguments | Name | Type | Description | |------|------|--------------| | `ev` | *EV object* | Validated EV object | ## Required conditions For an EV object to be valid, the following conditions must be satisfied. ### Weights * The sum of `W_cs`, `W_pc`, and `W_bs` must be positive. ### Arrival and departure * `Dep_time` must be greater than `Arr_time`. ### Energy-related * `E_cap`, `E_ini`, and `E_ref` must be greater than or equal to `E_min`. * `E_ini` and `E_ref` must be less than or equal to `E_cap`.