new updates
This commit is contained in:
@@ -73,6 +73,14 @@ export function validateBrandName(name: string): Record<string, string> {
|
||||
return errors
|
||||
}
|
||||
|
||||
export function validateTaxRate(code: string, name: string, percentage: number): Record<string, string> {
|
||||
const errors: Record<string, string> = {}
|
||||
if (!code.trim()) errors.code = "Code is required"
|
||||
if (!name.trim()) errors.name = "Name is required"
|
||||
if (Number.isNaN(percentage) || percentage < 0 || percentage > 100) errors.percentage = "Percentage must be between 0 and 100"
|
||||
return errors
|
||||
}
|
||||
|
||||
/** Renamed from validateVariantCategoryName — "variant categories" are Item Types now. */
|
||||
export function validateItemTypeName(name: string): Record<string, string> {
|
||||
const errors: Record<string, string> = {}
|
||||
|
||||
Reference in New Issue
Block a user