MCPcopy Create free account
hub / github.com/Botloader/botloader / push_field_error

Method push_field_error

components/validation/src/lib.rs:55–65  ·  view source on GitHub ↗
(&mut self, field: &str, msg: impl Into<String>)

Source from the content-addressed store, hash-verified

53
54impl ValidationContext {
55 fn push_field_error(&mut self, field: &str, msg: impl Into<String>) {
56 let mut prefix = self.field_stack.join(".");
57 if !prefix.is_empty() {
58 prefix.push('.');
59 }
60
61 self.errs.push(ValidationError {
62 field: format!("{prefix}{field}"),
63 msg: msg.into(),
64 });
65 }
66
67 fn push_error(&mut self, msg: impl Into<String>) {
68 let fields = self.field_stack.join(".");

Callers 12

validateMethod · 0.80
check_plugin_nameFunction · 0.80
check_script_nameFunction · 0.80
check_script_sourceFunction · 0.80
validateMethod · 0.80
check_name_fieldFunction · 0.80
check_description_fieldFunction · 0.80
validate_option_nameFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected