Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solved issues related to the company validation. #41

Conversation

amolsontakke3576
Copy link
Contributor

Solved below issue

  1. #1286 V2 - Observed that Enter Company Name accepts any number characters and appropriate error message is not displayed when create company fails
  2. #1285 V2 - Company Already Exist message is displayed even if company does not exist
  3. #1287 V2 - Not able to add company name that is starting with digit or special character.

Screenshot from 2020-06-22 12-42-46
Screenshot from 2020-06-22 12-42-25
Screenshot from 2020-06-22 13-00-09

Added max length validation
Added regex validation as per organization service

Signed-off-by: Amol Sontakke <amols@proximabiz.com>
Signed-off-by: Amol Sontakke <amols@proximabiz.com>
@amolsontakke3576 amolsontakke3576 added the bug Something isn't working label Jun 22, 2020
@amolsontakke3576 amolsontakke3576 self-assigned this Jun 22, 2020
Signed-off-by: Amol Sontakke <amols@proximabiz.com>
companyName: ['', Validators.compose([Validators.required, NameValidator.isValid])],
companyWebsite: ['', Validators.compose([Validators.required, UrlValidator.isValid])],
companyName: ['', Validators.compose([Validators.required, Validators.pattern('^[a-zA-Z0-9- ]*$'), Validators.maxLength(60)])],
companyWebsite: ['', Validators.compose([Validators.required, UrlValidator.isValid, Validators.maxLength(255)])],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume the UrlValidator.isValid does the right thing here and validate the URL - similar to: https://www.regextester.com/94502

Copy link
Contributor Author

@amolsontakke3576 amolsontakke3576 Jun 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dealako Ohh it has an issue when path start or end with number. I will update regex.

Copy link
Member

@dealako dealako left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@dealako dealako merged commit 7e3f9af into communitybridge:master Jun 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants