Share via


ValidateSubmittedItem Routines

The following functions are used to perform custom validation for submitted form data for different types of forms used within Commerce Server. The field definition SimpleList object passed in their listFlds parameters provide the schema against which the values passed in the Dictionary object passed in the dictFldVals parameter can be tested.

iValidateSubmittedAddress

iValidateSubmittedAddressForAddressBook

iValidateSubmittedRegistrationData

ValidateSubmittedCreditCardData

ValidateSubmittedLoginData

ValidateSubmittedPurchaseOrderData

The schema also provides the error messages that are copied into the Dictionary object passed in the dictFldErrs parameter of these functions. The function GetFieldsErrorDictionary is called to perform the field-level validation based on the schema, and other, more specialized validation and error message copying are performed in the ValidateSubmittedItem functions.

The following code shows a call to validate a submitted address form:

iErrorLevel = iValidateSubmittedAddress(listFlds, _
                                        dictFldVals, _
                                        dictFldErrs)

In this call, the listFlds and dictFldVals parameters are passing data into the function, and the return value and the dictFldErrs parameter are passing data out of the function.

Copyright © 2005 Microsoft Corporation.
All rights reserved.