Permalink
Browse files

Update README.md.

  • Loading branch information...
1 parent fdbe399 commit 19f89867dd3dfc449ab94122755198ebddf4a8e9 @satazor satazor committed Jan 28, 2013
Showing with 4 additions and 2 deletions.
  1. +4 −2 README.md
View
@@ -74,8 +74,10 @@ var validator = function (value) {
return value;
};
-promptly.prompt('Name: ', { validator: validator , retry: true}, function (err, value) {
- // err is always null because promptly will be prompting for a name until it validates
+promptly.prompt('Name: ', { validator: validator }, function (err, value) {
+ // Since retry is true by default, err is always null
+ // because promptly will be prompting for a name until it validates
+ // Between each prompt, the error message from the validator will be printed
console.log('Name is:', value);
});
```

0 comments on commit 19f8986

Please sign in to comment.