doc: add spaces for code unification
doc: add spaces for code unification

- add space before the leading brace
- add a space before the opening bracket of the 'if' operator
- add spaces inside curly braces
yiminghe/async-validator,yiminghe/async-validator,yiminghe/async-validator