how to validate email filed. so that usual rules are checke


Topic: how to validate email filed. so that usual rules are checked for valid email address in mdb5 pro

Amol Mandar pro premium asked 2 years ago

Expected behavior

Actual behavior

Resources (screenshots, code snippets etc.)


Arkadiusz Idzikowski staff answered 2 years ago

@Amol Mandar You can use the code from our documentation: https://mdbootstrap.com/docs/b5/angular/forms/validation/

You just need to replace the Validators.required with Validators.email


softcon pro premium commented 2 years ago

if input type is email, the built-in html 5 validation should validate the email before form posting anyway, right?


Arkadiusz Idzikowski staff commented 2 years ago

@softcon If you want to use our validation directive and mdb-error/mdb-success components then you will need to use Angular js validation anyway. We use values returned by Angular to correctly update validation styles and messages.


Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Answered

Specification of the issue
  • User: Pro
  • Premium support: Yes
  • Technology: MDB Angular
  • MDB Version: MDB5 1.0.0
  • Device: any
  • Browser: all
  • OS: all
  • Provided sample code: No
  • Provided link: No