-
Notifications
You must be signed in to change notification settings - Fork 20
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
Fix: Do not search for wilaya by zip code if it's invalid #24
Comments
@xxKeefer this could be an issue you can work on 😄 ! |
Hey! This seems interesting. Could my friend @makebread and I get assigned this? |
Or could I work with @xxKeefer ? |
@InternetRamen it would be great if you create a validation method ( |
Hey @Fcmam5 I did a bit a of research as I'm not familiar with the Algerian postal system (i'm from Australia :D) it looks like the function |
Yes it make sense! So, the first two digits refers to the Wilaya (city code), and for Adrar it's So we'd expect:
Maybe we can for that only using Glad to have you here helping us @xxKeefer ! That's an honour that our project reached Australia 😄 ! |
Thank you for responding. I will try to create the method. |
@InternetRamen @xxKeefer already started working on it in #26, would you help us there? |
@Fcmam5 Got it |
@InternetRamen I just created #27 , I'll add a description there, that one should be a bit challenging as well 😄 |
@Fcmam5 I'll try my best! Thanks for the opportunity. |
In Algeria all ZIP codes are numeric in a form of
WILAYA_CODE_XXXX
. For example Oran city's code is 31, and it provinces have codes like31000
,310094
...In this line :
leblad/src/api/getWilayaByZipCode.js
Line 18 in 5837b9e
We are directly looking for the given zip code even if it's not a valid number. I suggest at least checking if the parameter is a number before searching.
The text was updated successfully, but these errors were encountered: