1
0
Fork 0
mirror of https://github.com/capistrano/capistrano synced 2023-03-27 23:21:18 -04:00

Move gh-pages site to the docs/ folder

This commit is contained in:
Matt Brictson 2016-08-23 18:04:57 -07:00
parent 2850048c21
commit 9d62e3d7b6
No known key found for this signature in database
GPG key ID: 2F279EAD1F2ACFAF
101 changed files with 0 additions and 11811 deletions

View file

@ -0,0 +1,16 @@
---
layout: default
title: Validation of variables
---
To validate a variable, each time before it is set, define a validation:
```ruby
validate :some_key do |key, value|
if value.length < 5
raise Capistrano::ValidationError, "Length of #{key} is too short!"
end
end
```
Multiple validations can be assigned to a single key. Validations will be executed in the order of registration.