Hi Patryk,
I have a requirement to validate a user based on his Shipping address zip code.
I just need to validate his zipcode and say weather are we serving the specified location or not.
If we are not serving that location I need to stop the customer for further proceeding.
Zip Code validation
Monday, November 25, 2024 3:41:42 PM
Hi,
Please look at the Roslyn scripts in GrandNode. One of our example has been written to validate the zip code. By default, we've added possibility to validate the Polish zip code, so you would need to make a customization. You can find it here: https://github.com/grandnode/grandnode/blob/develop/Grand.Web/Roslyn/ZipCodeValidation.csx
If you want to use Roslyn scripts, you need to activate them in appsettings.json file, just edit your appsettings.json file and on #90 line change the value of settings to True.
Restart your app and that's all.
Cheers!
Please look at the Roslyn scripts in GrandNode. One of our example has been written to validate the zip code. By default, we've added possibility to validate the Polish zip code, so you would need to make a customization. You can find it here: https://github.com/grandnode/grandnode/blob/develop/Grand.Web/Roslyn/ZipCodeValidation.csx
If you want to use Roslyn scripts, you need to activate them in appsettings.json file, just edit your appsettings.json file and on #90 line change the value of settings to True.
Restart your app and that's all.
Cheers!
Best regards,
Patryk
GrandNode Team
Patryk
GrandNode Team
0
Hi,
But can I Validate the zip code across the list of Zipcodes
Example : Zipcodes: 534002,534003
if the entered zip code is not available from the above list I need to show him a message
Is this possible?
Note: I need to save the list of zipcodes in Database and validate the entered zip code among them
But can I Validate the zip code across the list of Zipcodes
Example : Zipcodes: 534002,534003
if the entered zip code is not available from the above list I need to show him a message
Is this possible?
Note: I need to save the list of zipcodes in Database and validate the entered zip code among them
0