Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
angular-weblineindia-email
Advanced tools
AngularJS based Email component, provides option to add single / multiple email input field with validation. The email value is automatically validated on blur event. You can change validation message using props. You can also disable email field using di
Readme
AngularJS based Email component, provides option to add single / multiple email input field with validation. The email value is automatically validated on blur event. You can change validation message using props. You can also disable email field using disable props.
83.0 ✔ | 77.0 ✔ | 13.1.1 ✔ | 83.0 ✔ | 11.9 ✔ |
Install the npm package:
npm install angular-weblineindia-email
#OR
yarn add angular-weblineindia-email
Use the <angular-weblineindia-email>
component:
Add in app.module.ts file
import { NgModule } from "@angular/core";
import { EmailModule } from "angular-weblineindia-email";
@NgModule({
imports: [EmailModule]
})
export class AppModule {}
Add in app.component.ts file
import { faPlus, faMinus } from "@fortawesome/free-solid-svg-icons";
export class AppComponent {
faPlus: any = faPlus;
faMinus: any = faMinus;
values: any = [{ email: "" }];
emailValue: any = {
placeholder: "Enter Email",
maxlength: 50,
emailFormateError: "Email is not valid",
duplicateEmailError: "Do not enter same email",
name: "email",
id: "email",
disabled: false,
value: "",
isMultiple: true,
isShowPlus: true,
tabindex: 0,
index: 0
};
onFocus(event) {
event.target.placeholder = "";
}
onBlur(event) {
event.target.placeholder = this.emailValue.placeholder;
}
onChange(data) {
this.values[data.index].email = data.event.target.value;
}
onAddMultipleEmail() {
this.values.push({ email: "" });
}
}
Add in app.component.html file
<div *ngFor="let value of values;let indexOfelement=index;">
<lib-email
[placeholder]="emailValue.placeholder"
[maxlength]="emailValue.maxlength"
[emailFormateError]="emailValue.emailFormateError"
[duplicateEmailError]="emailValue.duplicateEmailError"
[name]="emailValue.name"
[id]="emailValue.id"
[disabled]="emailValue.disabled"
[value]="value.email"
[isMultiple]="emailValue.isMultiple"
[isShowPlus]="values.length-1 === indexOfelement"
[tabindex]="emailValue.tabindex"
[index]="indexOfelement"
[emailArray]="values"
(focus)="onFocus($event)"
(blur)="onBlur($event)"
(change)="onChange($event)"
(onPlus)="onAddMultipleEmail()"
></lib-email>
</div>
Prop | Type | default | Description |
---|---|---|---|
maxlength | Number | 50 | maxlength for email |
id | String | email id | |
emailFormateError | String | Email is not valid | email formate validation |
duplicateEmailError | String | Do not enter same email | duplicate email error |
onMultipleEmail | Function | when click on plus icon on email | |
name | String | email name. | |
index | Number | 0 | email index. |
emailArray | Array[Object] | [{email : ''}] | email default array |
isMultiple | Boolean | true | flag to implement multiple email |
isShowPlus | Boolean | false | flag to show plus icon for add multiple email |
placeholder | String | email placeholder | |
disabled | Boolean | false | disable input field |
tabindex | Number | 0 | email tabIndex |
value | String | email value |
Name | Description |
---|---|
focus | Gets triggered when the input field receives focus. |
blur | Gets triggered when the input field loses focus. |
change | Gets triggered every time when input got changed. |
onPlus | Gets triggered every time when click on plus button. |
We have built many other components and free resources for software development in various programming languages. Kindly click here to view our Free Resources for Software Development
Detailed changes for each release are documented in CHANGELOG.md.
angular-weblineindia-email, email-validation-component, email-input, angularjs-email-input, multi-email-input
FAQs
AngularJS based Email component, provides option to add single / multiple email input field with validation. The email value is automatically validated on blur event. You can change validation message using props. You can also disable email field using di
The npm package angular-weblineindia-email receives a total of 0 weekly downloads. As such, angular-weblineindia-email popularity was classified as not popular.
We found that angular-weblineindia-email demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.