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:
parent
2850048c21
commit
9d62e3d7b6
101 changed files with 0 additions and 11811 deletions
|
@ -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.
|
Loading…
Add table
Add a link
Reference in a new issue