PHP code to check for required fiels
Here is how its done:

First create a new rule then,


**Events**
-User has logged in



**Condition**
-Data Value is empty


you have to enter the value u want to check, something like 
site:current-user:field-skills
make sure to change field-skills to the field name you want to check.


**Actions**
-Show a message on the site 
"enter the message you want"
-page redirect
"enter uri to redirect to"


here is an export of the rule:

{ "rules_check_required_fields" : {
"LABEL" : "Check required fields",
"PLUGIN" : "reaction rule",
"REQUIRES" : [ "rules" ],
"ON" : [ "user_login" ],
"IF" : [
  { "data_is_empty" : { "data" : [ "site:current-user:field-skills" ] } }
],
"DO" : [
  { "drupal_message" : { "message" : "Field skills is empty", "type" : "warning" } },
  { "redirect" : { "url" : "\u003Cfront\u003E" } }
]


}
}