1 line
12 KiB
JSON
1 line
12 KiB
JSON
|
|
{"type":"component","meta":{"docsUrl":"https://v2.quasar.dev/vue-components/input"},"props":{"name":{"type":"String","desc":"Used to specify the name of the control; Useful if dealing with forms; If not specified, it takes the value of 'for' prop, if it exists","examples":["'car_id'"],"category":"behavior"},"mask":{"type":"String","desc":"Custom mask or one of the predefined mask names","examples":["'###-##'","'date'","'datetime'","'time'","'fulltime'","'phone'","'card'"],"category":"mask"},"fill-mask":{"type":["Boolean","String"],"desc":"Fills string with specified characters (or underscore if value is not string) to fill mask's length","examples":["true","'0'","'_'"],"category":"mask"},"reverse-fill-mask":{"type":"Boolean","desc":"Fills string from the right side of the mask","category":"mask"},"unmasked-value":{"type":"Boolean","desc":"Model will be unmasked (won't contain tokens/separation characters)","category":"mask"},"mask-tokens":{"type":"Object","desc":"Object of custom mask tokens to be added on top of the default ones; Can also override any of the default ones","definition":{"...tokenCharacter":{"type":"Object","desc":"The definition for the current custom mask token","required":true,"definition":{"pattern":{"type":"String","required":true,"desc":"A string representing a regular expression to match against a single character","examples":["'[0-9]'","'[a-zA-Z]'"]},"negate":{"type":"String","required":true,"desc":"A string representing a regular expression to NOT match against a single character","examples":["'[^0-9]'","'[^a-zA-Z]'"]},"transform":{"type":"Function","required":false,"desc":"A function that takes the character as argument and returns the transformed character","examples":["v => v.toLocaleUpperCase()"],"params":{"char":{"type":"String","required":true,"desc":"The character being transformed","examples":["'a'","'1'"]}},"returns":{"type":"String","desc":"The transformed character"}}},"examples":["{ pattern: '[0-4a-eA-E]', negate: '[^0-4a-eA-E]', transform: v => v.toLocaleUpperCase() }","{ pattern: '[5-8]', negate: '[^5-8]' }"]}},"examples":["{ C: { pattern: '[0-4a-eA-E]', negate: '[^0-4a-eA-E]', transform: v => v.toLocaleUpperCase() } }"],"category":"mask","addedIn":"v2.18.4"},"model-value":{"desc":"Model of the component; Either use this property (along with a listener for 'update:modelValue' event) OR use v-model directive","required":true,"syncable":true,"category":"model","type":["String","Number","FileList","null","undefined"],"examples":["# v-model=\"myText\""]},"error":{"type":["Boolean","null"],"default":"null","desc":"Does field have validation errors?","category":"validation","required":false},"error-message":{"type":"String","desc":"Validation error message (gets displayed only if 'error' is set to 'true')","examples":["'Username must have at least 5 characters'"],"category":"validation"},"no-error-icon":{"type":"Boolean","desc":"Hide error icon when there is an error","category":"validation"},"rules":{"type":"Array","tsType":"ValidationRule","desc":"Array of Functions/Strings; If String, then it must be a name of one of the embedded validation rules","examples":["[ val => val.length <= 3 || 'Please use maximum 3 characters' ]","[ 'fulltime' ]","[ (val, rules) => rules.email(val) || 'Please enter a valid email address' ]"],"category":"validation"},"reactive-rules":{"type":"Boolean","desc":"By default a change in the rules does not trigger a new validation until the model changes; If set to true then a change in the rules will trigger a validation; Has a performance penalty, so use it only when you really need it","category":"validation"},"lazy-rules":{"type":["Boolean","String"],"desc":"If set to boolean true then it checks validation status against the 'rules' only after field loses focus for first time; If set to 'ondemand' then it will trigger only when component's validate() method is manually called or when the wrapper QForm submits itself","default":"false","values":["true","false","'ondemand'"],"category":"validation","required":false},"label":{"type":"String","desc":"A text label
|