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§
Sourcefn validate(&self) -> Result<(), ProgramError>
fn validate(&self) -> Result<(), ProgramError>
Validate the arguments in isolation. Called before account validation.