Skip to content

Konicord/validator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Validator

A simple validator of file extensions

Installation

If available in Hex, the package can be installed by adding validator to your list of dependencies in mix.exs:

def deps do
  [
    {:validator, "~> 0.1.0"}
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/validator.

Usage

Basic console usage:

$ iex -S mix

iex> file = "lib/test/myfile.test.png"
  ...
iex> Path.extname(file)
".png"

Application/Validation usage:

$ iex -S mix
iex> Validator.valid?("filename.jpg")
 ... returns a boolean

About

Extension validation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages