MCPcopy Create free account
hub / github.com/dfinity/orbit / validate

Method validate

core/control-panel/impl/src/models/user.rs:178–185  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

176
177impl ModelValidator<UserError> for User {
178 fn validate(&self) -> ModelValidatorResult<UserError> {
179 if let UserSubscriptionStatus::Pending(email) = &self.subscription_status {
180 validate_email(email)?;
181 }
182 validate_stations(&self.stations)?;
183
184 Ok(())
185 }
186}
187
188#[cfg(test)]

Callers 15

createMethod · 0.45
register_userMethod · 0.45
add_deployed_stationMethod · 0.45
createMethod · 0.45
editMethod · 0.45
add_stationsMethod · 0.45
remove_stationsMethod · 0.45
update_stationsMethod · 0.45
test_find_by_namespaceFunction · 0.45
test_find_by_fullnameFunction · 0.45
test_find_by_categoryFunction · 0.45

Calls 2

validate_emailFunction · 0.85
validate_stationsFunction · 0.85

Tested by 8

test_find_by_namespaceFunction · 0.36
test_find_by_fullnameFunction · 0.36
test_find_by_categoryFunction · 0.36
test_find_by_tagFunction · 0.36
test_find_by_kindFunction · 0.36
test_find_by_versionFunction · 0.36