Click or drag to resize
UploadValidator Method
Add a validation method to check file uploads. Multiple validators can be added by calling this method multiple times. They will be executed in sequence when a file has been uploaded.

Namespace:  DataTables
Assembly:  DataTables (in DataTables.dll) Version: 1.6.5.0 (1.6.5.0)
Syntax
C#
public Upload Validator(
	Func<HttpPostedFile, string> fn
)

Parameters

fn
Type: SystemFuncHttpPostedFile, String
Validation function. The function takes a single parameter, an HttpPostedFile, and a string is returned on error with the error message. If the validation does not fail, 'null' should be returned.

Return Value

Type: Upload
Self for chaining
See Also