MCPcopy Create free account
hub / github.com/angular-rust/yew-components / new

Method new

src/text_inputs/validity_state.rs:30–43  ·  view source on GitHub ↗

Creates a new `ValidityState`. All the fields except `valid` is set to false except `valid`, which is set to `true`

()

Source from the content-addressed store, hash-verified

28 /// All the fields except `valid` is set to false except `valid`, which is
29 /// set to `true`
30 pub fn new() -> Self {
31 Self {
32 bad_input: false,
33 custom_error: false,
34 pattern_mismatch: false,
35 range_overflow: false,
36 range_underflow: false,
37 too_long: false,
38 too_short: false,
39 type_mismatch: false,
40 valid: true,
41 value_missing: false,
42 }
43 }
44
45 pub fn bad_input(&self) -> bool {
46 self.bad_input

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected