Continue validation feature
This commit is contained in:
parent
bff36b0ce3
commit
0ff7d59f63
6 changed files with 116 additions and 24 deletions
|
@ -21,6 +21,7 @@ impl Component for InputGroup {
|
|||
render_if_ne(&mut self.props, props)
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "validate"))]
|
||||
fn view(&self) -> Html {
|
||||
render::render_with_prefix(
|
||||
&self.props,
|
||||
|
@ -28,4 +29,15 @@ impl Component for InputGroup {
|
|||
render::div(&self.props.children),
|
||||
)
|
||||
}
|
||||
|
||||
#[cfg(feature = "validate")]
|
||||
fn view(&self) -> Html {
|
||||
let div = html! {
|
||||
<div>
|
||||
{ for (&self.props.children).iter() }
|
||||
{ super::render_validation_feedback(&self.props.error_code, &self.props.errors) }
|
||||
</div>
|
||||
};
|
||||
render::render_with_prefix(&self.props, "input-group", div)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue