Use array instead of Closure in register
Validation during the function register