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

When customizing a new person, Name , Last name and Number fields accept wrong and random input ( false information) #1039

Open
Ouchi-Ranim opened this issue Mar 29, 2024 · 10 comments · May be fixed by #1073

Comments

@Ouchi-Ranim
Copy link

Ouchi-Ranim commented Mar 29, 2024

Bug description
The name/Last name fields accept numerical values and random values and the phone number field accept alphabetical which is misleading and produces unreliable information

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'People'
  2. Click on 'Add new Person'
  3. Scroll down to name and enter any numerical value and enter alphabetical value in the phone field.
  4. See error

Expected behavior
The placeholders for names only accept alphabetic characters, while the placeholder for phone numbers should exclusively allow numerical input.

Screenshots
Capture d'écran 2024-03-29 030005

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser chrome 123.0.6312.86/87

Additional context
I can fix the issue if permitted.

@inesmrad
Copy link
Contributor

Hi , i reproduced the bug with idurar version 4.0.0-beta.3, on OS: windows 10 and on a chrome browser version 123.0.6312.86 .
I got the same output, last and first name fields accept symbols/numbers and phone number accepts alphabetical characters as well as symbols.

@aspired2001
Copy link

Hi @Ouchi-Ranim I have made the change but I am not able to push because of authentication problem

error

PS C:\Users\Wajahat Ali\Desktop\OpenSource\idurar-erp-crm> git push origin wajahatFixes
remote: Permission to idurar/idurar-erp-crm.git denied to aspired2001.
fatal: unable to access 'https://github.com/idurar/idurar-erp-crm.git/': The requested URL returned error: 403
PS C:\Users\Wajahat Ali\Desktop\OpenSource\idurar-erp-crm> git remote set-url origin git@github.com:idurar/idurar-erp-crm.git
PS C:\Users\Wajahat Ali\Desktop\OpenSource\idurar-erp-crm> git push origin wajahatFixes
ERROR: Permission to idurar/idurar-erp-crm.git denied to aspired2001.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

@aspired2001
Copy link

aspired2001 commented Mar 31, 2024

IdurarFixed.txt

File changed: frontend/src/pages/People/config.js

Here is the fixed code please review it and let me know @Ouchi-Ranim

@Ouchi-Ranim
Copy link
Author

Ouchi-Ranim commented Apr 2, 2024

Hello @aspired2001 , I was just testing your piece of code but unfortunately it doesn't work out! thank you for your effort
Capture d'écran 2024-04-02 142826

@Pratish10
Copy link

Pratish10 commented Apr 2, 2024

Hi @Ouchi-Ranim Can you please assign this to me ?
I have the fix and tested in local environment working fine
firstname and lastname will only accept charactors
phone will only accept numbers
I have added regex for 3 of them

Thanks

tanmaytrivedi9140 added a commit to tanmaytrivedi9140/idurar-erp-crm that referenced this issue Apr 3, 2024
…name and Number fields accept wrong and random input ( false information)
@tanmaytrivedi9140
Copy link

Hi @Ouchi-Ranim please assign this issue to me
I would like to fix this issue
Please let me know
Thank you

@aspired2001
Copy link

Hello @aspired2001 , I was just testing your piece of code but unfortunately it doesn't work out! thank you for your effort Capture d'écran 2024-04-02 142826

Thanks for your feedback @Ouchi-Ranim I will take quick look into it

@MehdiMsa
Copy link

MehdiMsa commented May 5, 2024

Hello @Ouchi-Ranim, I am working on an issue within the project & I do believe that it is somehow similar to the issue you faced.
I would kindly ask if you could provide me some further explanation on how you figured out the required changes within the file.
Here is the link below for the issue I flagged so you could understand the context:
https://github.com/idurar/idurar-erp-crm/issues/1074
Thank you!

@Ouchi-Ranim
Copy link
Author

@MehdiMsa Sure, so basically I reckoned that the issue is within the forms and how they accept invalid input, so I cloned the code on my local machine and investigated the forms file within the frontend folder, checked which fields hold that issue and used Regex to prevent invalid input, you can check the fixed code I pushed, it has more info and further details. Thank you!

@MehdiMsa
Copy link

@MehdiMsa Sure, so basically I reckoned that the issue is within the forms and how they accept invalid input, so I cloned the code on my local machine and investigated the forms file within the frontend folder, checked which fields hold that issue and used Regex to prevent invalid input, you can check the fixed code I pushed, it has more info and further details. Thank you!

Hi Ranim, thank you for your explanation & help. It is indeed very helpful. I pushed my contribution already & the changes were made on the backend. Indeed I had to adjust the parameters in the file Config.js in the model folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants