Well with a little bit of code you can achieve this. You need to use maxlength attribute to restrict the length and following approach for number only validation.
Have an attribute bound to your inputText
<aura:attribute name="inputN" type="String"/>
<ui:inputText value="{!v.inputN}" keypress="{!c.validate}" keyup="{!c.validate}" keydown="{!c.validate}" updateOn="keypress, keyup, keydown"/>
In your controller, write validate function:
validate : function(component, event, helper) {
var inp = component.get('v.inputN');
if(isNaN(inp))
component.set('v.inputN', inp.substring(0, inp.length - 1));
}
It will on press of each key, check if the whole text is number of not, if not will remove the last entered character.
In case of validating maxlength using ui:inputNumber,
<aura:attribute name="inputN" type="Decimal"/>
<ui:inputNumber value="{!v.inputN}" keyup="{!c.validate}" updateOn="keyup"/>
Js function:
validate : function(component, event, helper) {
var inp = component.get('v.inputN');
if(inp.length > 2)
{
component.set('v.inputN', parseFloat(inp.substring(0, 2)));
}
}