C# Class DataAnnotationsExtensions.FileExtensionsAttribute

Inheritance: System.ComponentModel.DataAnnotations.DataTypeAttribute
Mostrar archivo Open project: srkirkland/DataAnnotationsExtensions

Public Methods

Method Description
FileExtensionsAttribute ( string allowedExtensions = "png,jpg,jpeg,gif" ) : System

Provide the allowed file extensions, seperated via comma or pipe, defaults to "png,jpeg,jpg,gif"

FormatErrorMessage ( string name ) : string
IsValid ( object value ) : bool

Private Methods

Method Description
ValidateExtension ( string fileName ) : bool

Method Details

FileExtensionsAttribute() public method

Provide the allowed file extensions, seperated via comma or pipe, defaults to "png,jpeg,jpg,gif"
public FileExtensionsAttribute ( string allowedExtensions = "png,jpg,jpeg,gif" ) : System
allowedExtensions string
return System

FormatErrorMessage() public method

public FormatErrorMessage ( string name ) : string
name string
return string

IsValid() public method

public IsValid ( object value ) : bool
value object
return bool