fn create_validator(&self, form_data: &Params) -> Result<(), FormValidationErrors> {
        let mut validation_errors: FormValidationErrors = HashMap::new();
        let mut validation_warnings: FormValidationErrors = HashMap::new();

        for rules in &self.validators {
            for (key, ref validator) in rules.validators.iter().enumerate() {
                let args = rules.validators_arg[key].to_owned();
                for field_name in &rules.fields {
                    println!("Field: {:#?}", field_name);
                    println!("Type ref: {:#?}", rules.type_ref);
                    println!("Get: {:#?}", form_data.all(field_name));
                    println!("Args: {:#?}\n\t", args);

                    // Fetch fields withour any results
                    // We iterate over all fields with `field_name`
                    // Try parse with specific type
                    // We gathering all possible errors, without skiping any posible error
                    form_data.all(field_name)
                        // If field not exist - add error
                        .or_else(|| {
                            add_error(&mut validation_warnings, field_name, FormValidationError::FieldNotExist);
                            println!("ERR: Field not exit");
                            form_data.all(field_name)
                        })
                        .and_then(|v| {
                            // Iterate over fields
                            Some(v.iter()
                                .map(|x| {
                                    // Type inference via Parse
                                    (rules.type_ref_fn)(x).ok_or(0).ok()
                                        .and_then(|v| {
                                            println!("Parsed: OK");
                                            validator(args.to_owned(), x.to_owned());
                                            Some(v)
                                        })
                                        // If parse Error - add error
                                        .or_else(|| {
                                            add_error(&mut validation_errors, field_name, FormValidationError::ParseError);
                                            println!("Parsed: ERR");
                                            None
                                        });
                                    // Return same field
                                    x
                                }).cloned().collect::<String>())
                        });
                }
            }
        }

        println!("Warnings: {:#?}", validation_warnings);
        println!("Errors: {:#?}", validation_errors);

        /*
        println!("Validators: {:#?}", tst.len());
        for vl in tst {
            println!("Fields: {:#?}", vl.fields);
            println!("Validators count: {:#?}", vl.validators.len());
            println!("Args count: {:#?}", vl.validators_arg.len());
            for (key, ref val) in vl.validators.iter().enumerate() {
                let args = vl.validators_arg[key].to_owned();
<                val(args);
                //println!("Index: {:#?}", (*val)(vl.validators_arg[key]));
                println!("Field: {:#?}", vl.fields[key]);
                println!("Index: {:#?}", vl.validators_arg[key]);
                //val(vl.validators_arg[key]);
            }
        }*/
        if validation_errors.is_empty() { Ok(()) } else { Err(validation_errors) }
    }
/*
Algorithm for fields fetching and validation:
1. Fetch request fields by validation fields name.
1.1. If field not exist add data to Warnings slice.
2. If field not exit set default value to field.
3. Parse field by type.
3.1. If parse error add data to Errors slice and break current iteration to next field.
4. Init validatorFieldData struct:
	* fieldName
	* fieldData
	* fieldType
	* errorsData
	* warningsData
5. Fetch validators for field item
5.1. Invoke validator function with params: validatorArgs, validatorFieldData
5.2. Check is validator return error. If error add it to Error slice.
    */
Algorithm for fields fetching and validation:
1. Fetch request fields by validation fields name.
Algorithm for fields fetching and validation : 1 . Fetch request fields by validation fields name .
fn create_validator(&self, form_data: &Params) -> Result<(), FormValidationErrors> {
        let mut validation_errors: FormValidationErrors = HashMap::new();
        let mut validation_warnings: FormValidationErrors = HashMap::new();
        for rules in &self.validators {
            for (key, ref validator) in rules.validators.iter().enumerate() {
                let args = rules.validators_arg[key].to_owned();
                for field_name in &rules.fields {
                    println!("Field: {:#?}", field_name);
                    println!("Type ref: {:#?}", rules.type_ref);
                    println!("Get: {:#?}", form_data.all(field_name));
                    println!("Args: {:#?}\n\t", args);
                    // Fetch fields withour any results
                    // We iterate over all fields with `field_name`
                    // Try parse with specific type
                    // We gathering all possible errors, without skiping any posible error
                    form_data.all(field_name)
                        // If field not exist - add error
                        .or_else(|| {
                            add_error(&mut validation_warnings, field_name, FormValidationError::FieldNotExist);
                            println!("ERR: Field not exit");
                            form_data.all(field_name)
                        })
                        .and_then(|v| {
                            // Iterate over fields
                            Some(v.iter()
                                .map(|x| {
                                    // Type inference via Parse
                                    (rules.type_ref_fn)(x).ok_or(0).ok()
                                        .and_then(|v| {
                                            println!("Parsed: OK");
                                            validator(args.to_owned(), x.to_owned());
                                            Some(v)
                                        })
                                        // If parse Error - add error
                                        .or_else(|| {
                                            add_error(&mut validation_errors, field_name, FormValidationError::ParseError);
                                            println!("Parsed: ERR");
                                            None
                                        });
                                    // Return same field
                                    x
                                }).cloned().collect::<String>())
                        });
                }
            }
        }
        println!("Warnings: {:#?}", validation_warnings);
        println!("Errors: {:#?}", validation_errors);
        /*
        println!("Validators: {:#?}", tst.len());
        for vl in tst {
            println!("Fields: {:#?}", vl.fields);
            println!("Validators count: {:#?}", vl.validators.len());
            println!("Args count: {:#?}", vl.validators_arg.len());
            for (key, ref val) in vl.validators.iter().enumerate() {
                let args = vl.validators_arg[key].to_owned();
<                val(args);
                //println!("Index: {:#?}", (*val)(vl.validators_arg[key]));
                println!("Field: {:#?}", vl.fields[key]);
                println!("Index: {:#?}", vl.validators_arg[key]);
                //val(vl.validators_arg[key]);
            }
        }*/
        if validation_errors.is_empty() { Ok(()) } else { Err(validation_errors) }
    }
fn create_validator ( & self , form_data : & Params ) -> Result < ( ) , FormValidationErrors > { let mut validation_errors : FormValidationErrors = HashMap :: new ( ) ; let mut validation_warnings : FormValidationErrors = HashMap :: new ( ) ; for rules in & self . validators { for ( key , ref validator ) in rules . validators . iter ( ) . enumerate ( ) { let args = rules . validators_arg [ key ] . to_owned ( ) ; for field_name in & rules . fields { println ! ( " " field_name ) ; println ! ( " " rules type_ref ) ; println ! ( " " form_data all ( field_name ) ) ; println ! ( " \n \t " args ) ; // Fetch fields withour any results // We iterate over all fields with `field_name` // Try parse with specific type // We gathering all possible errors, without skiping any posible error form_data . all ( field_name ) // If field not exist - add error . or_else ( | | { add_error ( & mut validation_warnings , field_name , FormValidationError :: FieldNotExist ) ; println ! ( " " ) ; form_data . all ( field_name ) } ) . and_then ( | v | { // Iterate over fields Some ( v . iter ( ) . map ( | x | { // Type inference via Parse ( rules . type_ref_fn ) ( x ) . ok_or ( 0 ) . ok ( ) . and_then ( | v | { println ! ( " " ) ; validator ( args . to_owned ( ) , x . to_owned ( ) ) ; Some ( v ) } ) // If parse Error - add error . or_else ( | | { add_error ( & mut validation_errors , field_name , FormValidationError :: ParseError ) ; println ! ( " " ) ; None } ) ; // Return same field x } ) . cloned ( ) . collect :: < String > ( ) ) } ) ; } } } println ! ( " " validation_warnings ) ; println ! ( " " validation_errors ) ; /*
        println!("Validators: {:#?}", tst.len());
        for vl in tst {
            println!("Fields: {:#?}", vl.fields);
            println!("Validators count: {:#?}", vl.validators.len());
            println!("Args count: {:#?}", vl.validators_arg.len());
            for (key, ref val) in vl.validators.iter().enumerate() {
                let args = vl.validators_arg[key].to_owned();
<                val(args);
                //println!("Index: {:#?}", (*val)(vl.validators_arg[key]));
                println!("Field: {:#?}", vl.fields[key]);
                println!("Index: {:#?}", vl.validators_arg[key]);
                //val(vl.validators_arg[key]);
            }
        }*/ if validation_errors . is_empty ( ) { Ok ( ( ) ) } else { Err ( validation_errors ) } }
Algorithm for fields fetching and validation:
1.
Algorithm for fields fetching and validation : 1 .
&self
form_data
&Params