fb function and from validate