# Check Fraction only in Math Input

**URL:** <https://cl.desmos.com/t/check-fraction-only-in-math-input/1584>\
**Category:** Questions\
**Tags:** validation, correctness\
**Created:** [September 27, 2020, 10:40am UTC](https://cl.desmos.com/t/check-fraction-only-in-math-input/1584 "2020-09-27T10:40:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jme](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/jme/32/516_2.png) [@Jme](https://cl.desmos.com/u/Jme)\
**Post date:** [September 27, 2020, 10:40am UTC](https://cl.desmos.com/t/check-fraction-only-in-math-input/1584/1 "2020-09-27T10:40:13Z")

</div>

How can I just check for fraction form only in a math input? (No decimal)  
Here’s what I have so far for the fraction of 1/6:

```auto
answer=input1
correct=numericValue("\abs(${answer.latex}-(1/6))")<=0.001
```

---

<div class="post-metadata">

**Author:** ![SqrtOfPi](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/sqrtofpi/32/899_2.png) [@SqrtOfPi](https://cl.desmos.com/u/SqrtOfPi)\
**Post date:** [September 27, 2020, 11:59am UTC](https://cl.desmos.com/t/check-fraction-only-in-math-input/1584/2 "2020-09-27T11:59:26Z")

</div>

In general, some form of countNumberUsage should work… I believe you would add this to the correct statement:

and countNumberUsage(answer,1)=1 and countNumberUsage(answer,6)=1
