Captcha

Shows Captcha.

Features/Functionality

  • Shows Captcha.
  • Display validate button also
  • Without validate, it will display error.

Basic Usage

Dependencies

HTML Structure

<require from="{user_path}/captchas/captcha"></require>
<cst-captcha input-mdl.bind="" options.bind="" other-info.bind="" evt-click-callback.bind=""></cst-captcha>

Bindable Properties

Property NameData TypeRequiredDecription
inputMdlnumberNoSpecifies the state of captcha.
optionsobjectNoBasic component options
otherInfoanyNoExtra info to be passed on event
evtClickCallbackmethodYesGive callback on verify button click

inputMdl

-1 = No value,
0 = Wrong value,
1 = True value

options

options = {
captchaLength: 5, // Length of captcha
hideVerifyBtn: false, // Hide verify button
pageLabel: {}, // Override page labels
pageColorData: {} // Override css colour property
}

evtClickCallback

evtClickCallback(_event,_info);
_info = {
overrideContext: overrideContext,
otherInfo: otherInfo,
value: -1/ 0/ 1
}

Working Example

HTML

<template>
<require from="./shared/custom_comp/captchas/captcha"></require>
<div>
<cst-captcha input-mdl.bind="captchaStatus" options.bind="options" other-info.bind="otherInfo" evt-click-callback.bind="evtClickCallback"></cst-captcha>
</div>
</template>

JS

class MyCls{
constructor(){
this.otherInfo = {};
this.captchaStatus = -1;
this.options = {};
}
evtClickCallback(_event,_info) {
}
}
export { MyCls }

Example Screen Shots

Image of Ex

Demo Link
Demo

Commit check list

Mark down usage
https://guides.github.com/features/mastering-markdown/

VersionDateDeveloped ByInformation ClassificationReviewed ByApproved By
1.005-05-2020TarunINTERNALPrasan & GunjanPrasan