show error message in mdb-input


Topic: show error message in mdb-input

Pisarev pro asked 6 years ago

Hi, I try to use an error message with mdb-input component but it doesn't work:
<mdb-input type="text" id="name" :invalid="true" :error-msg="'some error...'" :value="name" @input="name = $event" label="name"/>
In Input.vue component you have a prop "errorMsg" which I use but I don't see you use it in a template at all:
<template>

<div:class="wrapperClass">

<iv-if="icon":class="iconClasses"/>

<labelv-if="label && basic":class="labelClasses"@click="focus"ref="label":for="id">{{label}}</label>

<component

:is="tag"

:id="id"

:class="className"

:type="type"

:placeholder="placeholder"

:disabled="disabled"

@focus="focus"

@blur="blur"

@click="wave"

@change="onChange"

ref="input"

@input="onChange"

:name="name"

:required="required"

:checked="innerChecked"

:value="innerValue"

/>

<labelv-if="label && !basic":class="labelClasses"@click="focus"ref="label":for="id">{{label}}</label>

<slot></slot>

</div>

</template>

Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Open

Specification of the issue
  • User: Pro
  • Premium support: No
  • Technology: MDB Vue
  • MDB Version: 4.6.0
  • Device: Notebook
  • Browser: Chrome
  • OS: Windows
  • Provided sample code: Yes
  • Provided link: No