create input method in controller to bintree

using this input method can iput data to binarytree
but before input it check the correct format