Skip to main content

ValidateArgs

Trait ValidateArgs 

Source
pub trait ValidateArgs {
    // Required method
    fn validate(&self) -> Result<(), ProgramError>;
}
Expand description

Trait for args that can be validated independently of accounts.

Implement this to perform pure argument validation (range checks, non-zero assertions, format validation) before touching any account state.

Required Methods§

Source

fn validate(&self) -> Result<(), ProgramError>

Validate the arguments in isolation. Called before account validation.

Implementors§