From 2518468a5c8d7a8075845bd1906815f1cd259acb Mon Sep 17 00:00:00 2001 From: TriJayCode Date: Sat, 14 Feb 2026 23:18:16 +0530 Subject: [PATCH 1/2] docs: add LocalDB connection string fallback for developers (#1) Updated the README to include a pre-configured connection string for SQL Server LocalDB. This helps new contributors who have Visual Studio installed but do not have a standalone SQL Server instance running, lowering the barrier to entry for the project. --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a63b06bd7..8e85c5b69 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,11 @@ Continuous deployment: https://ci.simplcommerce.com #### Steps to run -- Update the connection string in appsettings.json in SimplCommerce.WebHost +- **Update the connection string**: Open `appsettings.json` in `src/SimplCommerce.WebHost`. + - If you have **SQL Server** installed: + `"DefaultConnection": "Server=localhost;Database=SimplCommerce;Trusted_Connection=True;TrustServerCertificate=true"` + - If you **do not have SQL Server**, you can use **Visual Studio LocalDB**: + `"DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=SimplCommerce;Trusted_Connection=True;TrustServerCertificate=true;MultipleActiveResultSets=true"` - Build the whole solution. - In Solution Explorer, make sure that SimplCommerce.WebHost is selected as the Startup Project - Open the Package Manager Console Window and make sure that SimplCommerce.WebHost is selected as the Default project. Then type "Update-Database" then press "Enter". This action will create the database schema. From 4dac3315782f5f6f85bd3a219b80ec64a4e433ba Mon Sep 17 00:00:00 2001 From: Jayanth T Date: Sun, 8 Mar 2026 21:23:57 +0530 Subject: [PATCH 2/2] Code fix for Phone field accepting non numeric characters --- .../Areas/Checkouts/ViewModels/ShippingAddressVm.cs | 4 ++++ .../Areas/Checkouts/Views/Checkout/Shipping.cshtml | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/Modules/SimplCommerce.Module.Checkouts/Areas/Checkouts/ViewModels/ShippingAddressVm.cs b/src/Modules/SimplCommerce.Module.Checkouts/Areas/Checkouts/ViewModels/ShippingAddressVm.cs index b9ab9c192..b7277bda3 100644 --- a/src/Modules/SimplCommerce.Module.Checkouts/Areas/Checkouts/ViewModels/ShippingAddressVm.cs +++ b/src/Modules/SimplCommerce.Module.Checkouts/Areas/Checkouts/ViewModels/ShippingAddressVm.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -12,6 +13,9 @@ public class ShippingAddressVm public string ContactName { get; set; } + [Required(ErrorMessage = "Phone number is required")] + [Phone(ErrorMessage = "Please enter a valid phone number")] + [StringLength(20, MinimumLength = 10, ErrorMessage = "Phone number must be between 10 and 20 characters")] public string Phone { get; set; } public string AddressLine1 { get; set; } diff --git a/src/Modules/SimplCommerce.Module.Checkouts/Areas/Checkouts/Views/Checkout/Shipping.cshtml b/src/Modules/SimplCommerce.Module.Checkouts/Areas/Checkouts/Views/Checkout/Shipping.cshtml index 708309f2c..899885c77 100644 --- a/src/Modules/SimplCommerce.Module.Checkouts/Areas/Checkouts/Views/Checkout/Shipping.cshtml +++ b/src/Modules/SimplCommerce.Module.Checkouts/Areas/Checkouts/Views/Checkout/Shipping.cshtml @@ -83,7 +83,8 @@
- +
@@ -174,7 +175,8 @@
- +